/* ─── Timeline ─── */
.timeline {
  position: relative;
}

.timeline-item {
  display: flex;
  gap: var(--gap);
  margin-bottom: 4px;
  width: 100%;
}

/* ─── Timeline: Time Column ─── */
.timeline-time-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 52px;
  flex-shrink: 0;
}

.timeline-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink3);
  letter-spacing: 0.04em;
  line-height: 1;
  padding-top: 14px;
  white-space: nowrap;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 2px var(--border);
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: 4px;
  min-height: 24px;
}

.timeline-item:last-child .timeline-line { display: none; }

/* ─── Timeline states ─── */
.timeline-item--now .timeline-dot {
  background: var(--now);
  box-shadow: 0 0 0 3px var(--now-bg), 0 0 0 5px var(--now);
  animation: ring-pulse 2s infinite;
}
.timeline-item--now .timeline-time { color: var(--now); }
.timeline-item--now .timeline-line  { background: linear-gradient(to bottom, var(--now), var(--border)); }

.timeline-item--next .timeline-dot {
  background: var(--next);
  box-shadow: 0 0 0 3px var(--next-bg), 0 0 0 5px var(--next);
}
.timeline-item--next .timeline-time { color: var(--next); }

.timeline-item--done .timeline-dot { background: var(--surface3); }
.timeline-item--done .timeline-time { color: var(--done); }
.timeline-item--done .timeline-line { background: var(--surface3); }

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--now-bg), 0 0 0 5px var(--now); }
  50%       { box-shadow: 0 0 0 5px var(--now-bg), 0 0 0 8px rgba(192,57,43,0.2); }
}

/* ─── Spot Card ─── */
.spot-card {
  flex: 1;
  min-width: 0;
  width: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  overflow: hidden;
  cursor: pointer;
}

.spot-card:hover {
  border-color: var(--ink3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.spot-card--now {
  border-color: var(--now);
  box-shadow: 0 0 0 2px var(--now-bg), 0 4px 20px rgba(192,57,43,0.12);
}

.spot-card--next {
  border-color: var(--next);
  box-shadow: 0 0 0 2px var(--next-bg);
}

.spot-card--done {
  opacity: 0.6;
}

/* ─── Card Header ─── */
.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--gap);
}

.card-type-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.card-header-text { flex: 1; min-width: 0; }

.card-name {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-card--done .card-name { color: var(--done); }

.card-budget {
  font-size: var(--font-sm);
  color: var(--ink3);
  margin-top: 1px;
}

.card-status-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge--now {
  background: var(--now-bg);
  color: var(--now);
}

.badge--next {
  background: var(--next-bg);
  color: var(--next);
}

.card-expand-icon {
  color: var(--ink3);
  font-size: 14px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.card-expand-icon--open { transform: rotate(180deg); }

/* ─── Card Detail (expanded) ─── */
.card-detail {
  border-top: 1px solid var(--border);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Transit Row ─── */
.transit-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  color: var(--ink2);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.transit-icon {
  font-size: 15px;
  margin-top: 1px;
  flex-shrink: 0;
}

/* ─── Notes Row ─── */
.notes-row {
  font-size: var(--font-sm);
  color: var(--ink2);
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: break-word;
}

/* ─── Must Know Tags ─── */
.must-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.must-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--ink2);
  border: 1px solid var(--border);
}

.must-tag--cash {
  background: var(--warn-bg);
  color: var(--warn);
  border-color: #FFE066;
}

/* ─── Closed Warning ─── */
.closed-warn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #FFF3CD;
  border: 1px solid #FFE066;
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  font-weight: 600;
  color: #7D4E00;
}

/* ─── Hours Row ─── */
.hours-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-sm);
  color: var(--ink3);
}

/* ─── Action Buttons ─── */
.card-actions {
  display: flex;
  gap: 8px;
}

.btn-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.btn-nav:hover { background: var(--ink2); }

.btn-map {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--surface2);
  color: var(--ink2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  font-weight: 600;
}

.btn-map:hover { background: var(--surface3); }

/* ─── Map Embed ─── */
.map-embed {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 200px;
  border: none;
}

/* ─── Transit Connector (between spots) ─── */
.transit-connector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 var(--gap) 64px;
}

.transit-connector-line {
  width: 2px;
  height: 40px;
  background: var(--border);
  border-radius: 2px;
  flex-shrink: 0;
  margin-left: 25px;
}

.transit-connector-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 11px;
  color: var(--ink3);
  white-space: nowrap;
}

.transit-connector-pill .pill-icon { font-size: 13px; }

/* ─── Budget Summary ─── */
.budget-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap);
  background: var(--ink);
  border-radius: var(--radius);
  margin-bottom: var(--gap-lg);
  color: rgba(255,255,255,0.6);
  font-size: var(--font-sm);
}

.budget-bar-total {
  font-size: var(--font-xl);
  font-weight: 800;
  color: #fff;
}

/* ─── Empty Day ─── */
.empty-day {
  text-align: center;
  padding: 60px 0;
  color: var(--ink3);
  font-size: var(--font-md);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .topbar { padding: 0 var(--gap); }
  .topbar-date { display: none; }
  .main { padding: var(--gap) 12px 80px; }
}
