/* 上海四日游 - 浅色主题 (增强版 + 多断点响应式) */
:root {
  --bg: #fafaf9;
  --card-bg: #ffffff;
  --border: #e7e5e4;
  --text: #292524;
  --text-muted: #78716c;
  --text-soft: #a8a29e;
  --accent: #0891b2;
  --accent-light: #ecfeff;
  --day1: #0891b2;
  --day2: #7c3aed;
  --day3: #059669;
  --day4: #d97706;
  --day1-bg: #ecfeff;
  --day2-bg: #f5f3ff;
  --day3-bg: #ecfdf5;
  --day4-bg: #fffbeb;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ============ Keyframes ============ */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes timelinePulse {
  0%   { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(8, 145, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: #0e7490; }

small, .text-muted { color: var(--text-soft); }

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ============ Header ============ */
.site-header {
  text-align: center;
  padding: 48px 20px 32px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 50%, #f5f3ff 100%);
  border-bottom: 1px solid var(--border);
}
.site-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  word-break: keep-all;
}
.site-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

/* ============ Nav ============ */
.nav-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding: 8px 0;
}
.nav-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-base);
  white-space: nowrap;
}
.nav-home {
  background: var(--border);
  color: var(--text);
}
.nav-home:hover { background: #d6d3d1; }
.nav-prev, .nav-next {
  background: var(--accent-light);
  color: var(--accent);
}
.nav-prev:hover, .nav-next:hover { background: #cffafe; }
.nav-current {
  background: var(--accent) !important;
  color: #fff !important;
  pointer-events: none;
}

/* ============ Day cards on root page ============ */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 16px;
}
.day-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.5s ease both;
}
.day-card:nth-child(1) { animation-delay: 0.05s; }
.day-card:nth-child(2) { animation-delay: 0.15s; }
.day-card:nth-child(3) { animation-delay: 0.25s; }
.day-card:nth-child(4) { animation-delay: 0.35s; }
.day-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.day-card:nth-child(1)::before { background: var(--day1); }
.day-card:nth-child(2)::before { background: var(--day2); }
.day-card:nth-child(3)::before { background: var(--day3); }
.day-card:nth-child(4)::before { background: var(--day4); }
.day-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.day-card .day-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.day-card:nth-child(1) .day-label { color: var(--day1); }
.day-card:nth-child(2) .day-label { color: var(--day2); }
.day-card:nth-child(3) .day-label { color: var(--day3); }
.day-card:nth-child(4) .day-label { color: var(--day4); }
.day-card .day-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.day-card .day-brief {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ Sections ============ */
section {
  margin-bottom: 40px;
}
h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
h2 .icon { font-size: 1.2rem; flex-shrink: 0; }
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  letter-spacing: -0.005em;
}

/* ============ Cards ============ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: all var(--transition-base);
  animation: cardFadeIn 0.5s ease both;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.33s; }
.card:nth-child(6) { animation-delay: 0.40s; }
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.card-warn {
  background: #fffbeb;
  border-color: #fcd34d;
  border-left: 4px solid #f59e0b;
}
.card-warn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.card-tip {
  background: var(--accent-light);
  border-color: var(--accent);
  border-left: 4px solid var(--accent);
}

/* 卡片内 h3 下划线装饰 */
.card h3, .card-warn h3, .card-tip h3 {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.card h3::after, .card-warn h3::after, .card-tip h3::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 36px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.card-warn h3::after { background: #f59e0b; }
.card-tip h3::after  { background: var(--accent); }

/* ============ Timeline ============ */
.timeline {
  position: relative;
  padding-left: 32px;
  padding-bottom: 8px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base);
  animation: cardFadeIn 0.5s ease both;
}
.timeline-item:nth-child(1)  { animation-delay: 0.05s; }
.timeline-item:nth-child(2)  { animation-delay: 0.10s; }
.timeline-item:nth-child(3)  { animation-delay: 0.15s; }
.timeline-item:nth-child(4)  { animation-delay: 0.20s; }
.timeline-item:nth-child(5)  { animation-delay: 0.25s; }
.timeline-item:nth-child(6)  { animation-delay: 0.30s; }
.timeline-item:nth-child(7)  { animation-delay: 0.35s; }
.timeline-item:nth-child(8)  { animation-delay: 0.40s; }
.timeline-item:nth-child(9)  { animation-delay: 0.45s; }
.timeline-item:nth-child(10) { animation-delay: 0.50s; }
.timeline-item:hover { background: rgba(8, 145, 178, 0.03); }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -25px; top: 14px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 2px var(--accent);
  animation: timelinePulse 2.5s ease-in-out infinite;
}
.timeline-item:nth-child(odd)::before  { animation-delay: 0s; }
.timeline-item:nth-child(even)::before { animation-delay: 1.25s; }

.timeline-item::after {
  content: '';
  position: absolute;
  left: -32px; top: 0; bottom: 0;
  width: 3px; border-radius: 2px;
  opacity: 0.35;
  transition: opacity var(--transition-base);
}
.timeline-item:hover::after { opacity: 0.7; }
.timeline-item:nth-child(4n+1)::after { background: var(--day1); }
.timeline-item:nth-child(4n+2)::after { background: var(--day2); }
.timeline-item:nth-child(4n+3)::after { background: var(--day3); }
.timeline-item:nth-child(4n+4)::after { background: var(--day4); }

.timeline-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}
.timeline-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}

.timeline-item:nth-child(4n+1) .timeline-time { color: var(--day1); }
.timeline-item:nth-child(4n+2) .timeline-time { color: var(--day2); }
.timeline-item:nth-child(4n+3) .timeline-time { color: var(--day3); }
.timeline-item:nth-child(4n+4) .timeline-time { color: var(--day4); }
.timeline-item:nth-child(4n+1)::before { background: var(--day1); box-shadow: 0 0 0 2px var(--day1); }
.timeline-item:nth-child(4n+2)::before { background: var(--day2); box-shadow: 0 0 0 2px var(--day2); }
.timeline-item:nth-child(4n+3)::before { background: var(--day3); box-shadow: 0 0 0 2px var(--day3); }
.timeline-item:nth-child(4n+4)::before { background: var(--day4); box-shadow: 0 0 0 2px var(--day4); }

/* ============ Tables ============ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.9rem;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: linear-gradient(135deg, #fafaf9 0%, #f5f5f4 100%);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
}
tr:nth-child(even) td { background: rgba(250, 250, 249, 0.55); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f0fdfa; }
tr:nth-child(even):hover td { background: #e6f7f8; }

td a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 1px;
  transition: all var(--transition-base);
}
td a:hover { color: #0e7490; border-bottom-style: solid; }

/* ============ Map ============ */
.map-container {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: #f5f5f4;
  margin: 16px 0;
}

.static-map {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 16px 0;
}

/* ============ Tags ============ */
.tag {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-right: 4px;
  margin-bottom: 4px;
  transition: transform var(--transition-fast);
}
.tag:hover { transform: scale(1.05); }
.tag-blue   { background: #ecfeff; color: #0891b2; }
.tag-purple { background: #f5f3ff; color: #7c3aed; }
.tag-green  { background: #ecfdf5; color: #059669; }
.tag-amber  { background: #fffbeb; color: #d97706; }
.tag-gray   { background: #f5f5f4; color: #78716c; }

/* ============ Food list ============ */
.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.food-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  position: relative;
}
.food-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.food-item .food-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-base);
}
.food-item:hover .food-icon { background: #cffafe; }
.food-item .food-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.food-item .food-name {
  font-weight: 600;
  font-size: 0.92rem;
}
.food-item .food-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============ Tips / checklist ============ */
.tips {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 20px 0;
}
.tips-title {
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tips ul { list-style: none; padding: 0; }
.tips li {
  padding: 5px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
}
.tips li::before {
  content: '▸';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============ Constraint banner ============ */
.constraint {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ============ Route diagram ============ */
.route-diagram {
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-family: "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
  font-size: 0.85rem;
  line-height: 1.85;
  white-space: pre;
  overflow-x: auto;
  margin: 16px 0;
}

/* ============ Checklist ============ */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding: 7px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.checklist li .checkbox {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition-fast);
}
.checklist li:hover .checkbox { border-color: var(--accent); }

/* ============ Day page header ============ */
.day-header {
  padding: 40px 20px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.day-header.day1 { background: var(--day1-bg); }
.day-header.day2 { background: var(--day2-bg); }
.day-header.day3 { background: var(--day3-bg); }
.day-header.day4 { background: var(--day4-bg); }
.day-header .day-num {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.day-header.day1 .day-num { color: var(--day1); }
.day-header.day2 .day-num { color: var(--day2); }
.day-header.day3 .day-num { color: var(--day3); }
.day-header.day4 .day-num { color: var(--day4); }
.day-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 4px 0;
  letter-spacing: -0.015em;
  word-break: keep-all;
}

/* ============ Route card ============ */
.route-card {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: flex-start;
  margin-bottom: 10px;
  transition: all var(--transition-base);
}
.route-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.route-card .step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}
.route-card:hover .step-num { transform: scale(1.1); }
.route-card .step-body { flex: 1; min-width: 0; }
.route-card .step-title { font-weight: 600; font-size: 0.95rem; }
.route-card .step-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* ============ RESPONSIVE: Tablet ≤768px ============ */
@media (max-width: 768px) {
  .container { padding: 20px 16px 70px; }

  .site-header { padding: 36px 16px 24px; }
  .site-header h1 { font-size: 1.6rem; }

  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .day-card { padding: 20px; }

  h2 { font-size: 1.15rem; }
  section { margin-bottom: 34px; }

  .map-container { height: 320px; }

  .route-diagram {
    font-size: 0.78rem;
    padding: 16px;
  }

  .food-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .day-header { padding: 32px 16px 20px; }
  .day-header h1 { font-size: 1.4rem; }
}

/* ============ RESPONSIVE: Phone ≤640px ============ */
@media (max-width: 640px) {
  .container { padding: 14px 12px 90px; }

  .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .day-card { padding: 16px; }
  .day-card .day-title { font-size: 1rem; }

  .nav-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    margin-bottom: 0;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 1000;
    justify-content: space-evenly;
    gap: 2px;
    flex-wrap: nowrap;
    top: auto;
  }
  .nav-bar a {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.8rem;
    justify-content: center;
    border-radius: 8px;
  }

  .food-grid { grid-template-columns: 1fr; }
  .food-item { padding: 14px; }
  .food-item .food-icon {
    width: 36px; height: 36px;
    font-size: 1.3rem;
  }
  .food-item .food-name { font-size: 0.88rem; }

  .map-container { height: 260px; }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 0.8rem;
  }
  th, td { padding: 8px 10px; white-space: nowrap; }

  .timeline { padding-left: 26px; }
  .timeline::before { left: 10px; }
  .timeline-item {
    padding: 8px 0;
    margin-bottom: 16px;
  }
  .timeline-item::before {
    left: -21px;
    width: 10px; height: 10px;
  }
  .timeline-item::after {
    left: -26px;
    width: 2px;
  }
  .timeline-time { font-size: 0.8rem; }
  .timeline-text { font-size: 0.88rem; }

  .card, .card-warn, .card-tip { padding: 16px; }
  section { margin-bottom: 28px; }
  h2 { font-size: 1.1rem; margin-bottom: 14px; }
  h3 { font-size: 0.98rem; }

  .site-header { padding: 28px 14px 20px; }
  .site-header h1 { font-size: 1.35rem; }

  .day-header { padding: 24px 14px 16px; }
  .day-header h1 { font-size: 1.2rem; }

  .route-diagram {
    font-size: 0.72rem;
    padding: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
  }

  .constraint {
    flex-direction: column;
    font-size: 0.9rem;
    padding: 12px 14px;
  }

  .tips { padding: 14px 16px; }
  .tips li { font-size: 0.85rem; }
}

/* ============ RESPONSIVE: Small Phone ≤480px ============ */
@media (max-width: 480px) {
  .container { padding: 10px 10px 100px; }

  .site-header h1 { font-size: 1.2rem; }
  .site-header { padding: 24px 12px 18px; }
  .site-header .subtitle { font-size: 0.82rem; }

  .grid-4 { grid-template-columns: 1fr; }
  .day-card { padding: 14px; }
  .day-card .day-title { font-size: 0.95rem; }
  .day-card .day-brief { font-size: 0.8rem; }

  .nav-bar a {
    padding: 6px 8px;
    font-size: 0.75rem;
    min-width: 40px;
    min-height: 40px;
  }

  .timeline { padding-left: 22px; }
  .timeline::before { left: 8px; }
  .timeline-item { padding: 6px 0; margin-bottom: 12px; }
  .timeline-item::before {
    left: -18px; top: 12px;
    width: 8px; height: 8px;
  }
  .timeline-item::after {
    left: -22px; width: 2px;
  }
  .timeline-time { font-size: 0.75rem; }
  .timeline-text { font-size: 0.82rem; line-height: 1.55; }

  .food-item {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .food-item .food-icon {
    width: 32px; height: 32px;
    font-size: 1.1rem;
  }

  .map-container { height: 220px; border-radius: var(--radius-sm); }

  table { font-size: 0.72rem; }
  th, td { padding: 6px 8px; }

  .card, .card-warn, .card-tip { padding: 14px; }
  .card h3, .card-warn h3, .card-tip h3 { font-size: 0.92rem; }
  section { margin-bottom: 24px; }
  h2 { font-size: 1.05rem; }

  .day-header h1 { font-size: 1.1rem; }
  .day-header { padding: 20px 10px 14px; }

  .route-card {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .route-card .step-num { align-self: flex-start; }

  .route-diagram {
    font-size: 0.68rem;
    padding: 10px;
  }

  .constraint { font-size: 0.85rem; }
  .checklist li { font-size: 0.82rem; }
  .tips li { font-size: 0.82rem; }

  .tag {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  /* 页面标题长文本处理 */
  .day-header h1 {
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* ============ Missing compatibility classes ============ */
/* Fill gap: subagent-generated HTML used these but CSS didn't define them */
.event { display: inline; }
.info-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.info-table th, .info-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.info-table th { background: #fafaf9; font-weight: 600; font-size: 0.82rem; color: var(--text-muted); }
.map-area { margin: 16px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; }
.check::before { content: '☐'; font-size: 1.1rem; color: var(--text-muted); }
.footer-nav { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 0; margin-top: 32px; border-top: 1px solid var(--border); }
.footer-nav a { padding: 6px 14px; border-radius: var(--radius-sm); text-decoration: none; font-size: 0.85rem; font-weight: 500; background: var(--border); color: var(--text); transition: all var(--transition-base); }
.footer-nav a:hover { background: #d6d3d1; }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.img-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.img-wrap img { display: block; width: 100%; height: auto; }
.img-caption { padding: 10px 14px; background: var(--card-bg); font-size: 0.82rem; color: var(--text-muted); text-align: center; }
.route-logic { background: var(--accent-light); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 14px 18px; margin: 16px 0; font-size: 0.9rem; line-height: 1.6; }
.sub-section { margin-bottom: 24px; }
.sub-title { font-size: 1rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.tip { background: var(--accent-light); border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 16px; margin: 12px 0; font-size: 0.88rem; line-height: 1.6; }

/* ============ Print ============ */
@media print {
  body {
    font-size: 11pt; line-height: 1.5;
    color: #000; background: #fff;
  }
  .container { max-width: 100%; padding: 0 12mm; }
  .nav-bar, .map-container, .static-map { display: none !important; }
  .card, .card-warn, .card-tip, .day-card, .food-item, .route-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
    animation: none !important;
  }
  .card:hover, .day-card:hover, .food-item:hover, .route-card:hover {
    transform: none !important; box-shadow: none !important;
  }
  table { box-shadow: none; border: 1px solid #ccc; font-size: 9pt; }
  th, td { padding: 6px 10px; }
  th { background: #eee !important; color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  .day-header { break-before: page; }
  h2 { break-after: avoid; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
