/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brown:    #3d2b1f;
  --orange:   #e67e22;
  --orange-l: #f0a500;
  --green:    #4a7c59;
  --green-l:  #7db88a;
  --cream:    #fffdf5;
  --card-bg:  rgba(255, 252, 242, 0.93);
  --shadow:   0 3px 14px rgba(61,43,31,0.13);
  --radius:   14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans TC', sans-serif;
  background: #e8dfc8 url('../images/bg.png') center top / cover fixed;
  color: var(--brown);
  min-height: 100vh;
  padding-bottom: 48px;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background: rgba(255, 250, 235, 0.72);
  z-index: 0;
  pointer-events: none;
}

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 250, 235, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(230,126,34,0.3);
  padding: 14px 16px 0;
  box-shadow: 0 2px 14px rgba(61,43,31,0.15);
}

.site-header h1 {
  font-size: 16px;
  color: var(--brown);
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: .3px;
  line-height: 1.3;
}
.site-header h1 em {
  color: var(--orange);
  font-style: normal;
}

/* ── Day Tabs ── */
.tabs {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: 1px;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1; min-width: 74px;
  padding: 8px 6px 10px;
  border: none; border-radius: 10px 10px 0 0;
  background: transparent;
  color: #a08060;
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  line-height: 1.4;
  border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--orange); background: rgba(230,126,34,.07); }
.tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
  background: rgba(230,126,34,.1);
}
.tab .tab-date { font-size: 10px; font-weight: 400; opacity: .8; }

/* ── Day Panel ── */
.day-panel { display: none; padding: 14px 14px 0; position: relative; z-index: 1; }
.day-panel.active { display: block; }

/* ── Day Summary Card ── */
.day-summary {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
}
.day-summary .route {
  font-size: 15px; font-weight: 800;
  color: var(--brown); margin-bottom: 6px;
}
.day-summary .hotel-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #7a5c3a;
}
.day-summary .hotel-row .hotel-name { font-weight: 600; }
.badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.badge-ok     { background: #d4edda; color: #2d6a4f; }
.badge-warn   { background: #fde8c8; color: #b85c00; }
.badge-free   { background: #ddeeff; color: #1a5f8a; }
.badge-booked { background: #e8f5e9; color: #2e7d32; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 84px; }
.timeline::before {
  content: ''; position: absolute;
  left: 70px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--orange-l), var(--green-l));
  border-radius: 2px;
  opacity: .5;
}

/* ── Stop ── */
.stop { position: relative; margin-bottom: 10px; }

.stop-time {
  position: absolute; left: -84px;
  width: 58px; text-align: right;
  font-size: 10px; font-weight: 700;
  color: var(--orange); line-height: 1.3;
  top: 13px; padding-right: 2px;
}

.stop-dot {
  position: absolute; left: -15px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--orange-l);
  top: 14px; z-index: 1;
}
.stop-dot.hotel  { background: var(--green); box-shadow: 0 0 0 2px var(--green-l); }
.stop-dot.depart { background: #c0a070; box-shadow: 0 0 0 2px #d4b896; }

/* ── Stop Card ── */
.stop-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stop-card.hotel-card { border-left: 4px solid var(--green); }
.stop-card.warn-card  { border-left: 4px solid var(--orange); }

.card-img {
  width: 100%; height: 130px;
  background: linear-gradient(135deg, #f0e6d0, #d4c4a8);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 48px; line-height: 1;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-body { padding: 10px 12px 12px; }

.card-name {
  font-size: 14px; font-weight: 800;
  color: var(--brown); margin-bottom: 4px;
  line-height: 1.3;
}
.card-addr {
  font-size: 11px; color: #7a5c3a;
  line-height: 1.5; margin-bottom: 4px;
}
.card-note {
  font-size: 11px; color: #9a7a5a;
  line-height: 1.5; margin-bottom: 6px;
}
.card-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
}
.card-badges { display: flex; flex-wrap: wrap; gap: 4px; }

.map-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: #fff; background: var(--green);
  padding: 5px 11px; border-radius: 20px;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
}
.map-btn:hover { background: #3a6347; }

/* ── Travel Divider ── */
.travel-div {
  display: flex; align-items: center;
  gap: 8px; margin: 2px 0 2px -84px;
  padding-left: 66px;
}
.travel-div .t-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #c8b090; flex-shrink: 0;
}
.travel-div .t-text {
  font-size: 11px; color: #a08060;
  font-style: italic;
}

/* ── Today Banner ── */
.today-tag {
  display: inline-block;
  background: var(--orange);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  margin-left: 6px; vertical-align: middle;
}
