:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #2d3436;
  --muted: #636e72;
  --accent: #667eea;
  --border: #dfe6e9;
  --radius: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header h1 { font-size: 20px; font-weight: 700; }
.header h1 a { text-decoration: none; color: var(--text); }
.back-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--accent); }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
main { padding: 24px 0; }
.section-title { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-weight: 600; letter-spacing: 1px; }

/* Trip card styles */
.trip-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  transition: 0.2s;
}
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.card-cover {
  height: 140px;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  position: relative;
}
.card-date { font-size: 12px; color: rgba(255,255,255,0.9); background: rgba(0,0,0,0.2); padding: 2px 10px; border-radius: 10px; }
.card-body { padding: 14px 16px; }
.card-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: #f0f0f0; padding: 2px 10px; border-radius: 10px; font-size: 12px; color: var(--muted); }
.add-card {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* Day card styles (used in trip.html) */
.day-card {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.day-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; user-select: none;
}
.day-badge {
  width: 32px; height: 32px; border-radius: 50%;
  background: #f0f0f0; color: #666;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.day-badge.done { background: var(--accent); color: white; }
.day-title { font-size: 15px; font-weight: 600; }
.day-transport { font-size: 12px; color: var(--muted); margin-top: 2px; }
.collapse-icon { margin-left: auto; font-size: 12px; color: var(--muted); transition: 0.2s; }
.day-card.collapsed .day-body { display: none; }
.day-card.collapsed .collapse-icon { transform: rotate(-90deg); }
.day-body { padding: 0 16px 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.event-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; }
.event-time { font-size: 12px; color: var(--muted); min-width: 45px; padding-top: 2px; }
.event-check {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; cursor: pointer;
}
.check-box {
  width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: white; transition: 0.15s;
}
.check-box.checked { background: #4caf50; border-color: #4caf50; }
.event-info { flex: 1; font-size: 14px; }
.event-location { font-size: 12px; color: var(--muted); margin-left: 6px; }

/* Budget styles */
.budget-total {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}
.budget-total-amount { font-size: 32px; font-weight: 700; }
.budget-total-label { font-size: 13px; opacity: 0.9; margin-top: 4px; }
.budget-cat {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
}
.budget-cat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
}
.budget-cat-icon { font-size: 18px; }
.budget-cat-name { flex: 1; font-size: 14px; font-weight: 500; }
.budget-cat-amount { font-size: 14px; font-weight: 600; }
.budget-expand { font-size: 11px; color: var(--muted); transition: 0.2s; }
.budget-cat.expanded .budget-expand { transform: rotate(180deg); }
.budget-cat-items { display: none; padding: 0 16px 14px; }
.budget-cat.expanded .budget-cat-items { display: block; }
.budget-item {
  display: flex; justify-content: space-between;
  padding: 6px 0; font-size: 13px;
  border-top: 1px solid var(--border);
}

/* Checklist styles */
.checklist-group { margin-bottom: 20px; }
.checklist-category { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.checklist-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; cursor: pointer; font-size: 14px;
}
.checklist-item .done { text-decoration: line-through; color: var(--muted); }

