:root {
  --bg: #f6f7f5;
  --card: #ffffff;
  --ink: #1c2321;
  --muted: #5f6b67;
  --brand: #0f766e;
  --brand-ink: #0b4f4a;
  --accent: #f59e0b;
  --line: #e3e6e3;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}
.brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.topbar nav a {
  color: #d7f0ec; text-decoration: none; margin-left: 16px; font-weight: 600; font-size: .95rem;
}
.topbar nav a:active { color: #fff; }

/* Layout */
main { max-width: 760px; margin: 0 auto; padding: 16px 16px 40px; }
.loading { color: var(--muted); }

h1 { font-size: 1.5rem; margin: .2em 0 .1em; }
h2 { font-size: 1.15rem; margin: 1.4em 0 .4em; color: var(--brand-ink); }
h3 { font-size: 1rem; margin: 1em 0 .3em; }
p { margin: .4em 0; }
a { color: var(--brand); }

.subtitle { color: var(--muted); margin-top: 0; }

/* Cards */
.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.card:active { transform: scale(.995); }
.card .card-title { font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.card .card-dates { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.card .card-blurb { margin-top: 8px; color: var(--muted); font-size: .95rem; }

.pill {
  display: inline-block; font-size: .78rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: #e6f4f1; color: var(--brand-ink); margin: 2px 4px 2px 0;
}
.pill.accent { background: #fef3c7; color: #92600a; }

/* Tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 14px 0; padding-bottom: 4px; }
.tab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Itinerary day */
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0; box-shadow: var(--shadow); }
.day-head { font-weight: 700; color: var(--brand-ink); }
.day-sub { color: var(--muted); font-size: .88rem; margin-bottom: 8px; }
.item { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: none; }
.item .time { flex: 0 0 62px; color: var(--brand); font-weight: 600; font-size: .9rem; }
.item .what { flex: 1; }
.item .note { color: var(--muted); font-size: .88rem; }

/* Tips / events lists */
.entry { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin: 10px 0; box-shadow: var(--shadow); }
.entry .entry-title { font-weight: 700; }
.entry .entry-meta { color: var(--muted); font-size: .85rem; margin: 2px 0 6px; }

/* Weather */
.weather-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 8px; margin: 10px 0; }
.wx { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; box-shadow: var(--shadow); }
.wx .d { font-size: .8rem; color: var(--muted); }
.wx .ico { font-size: 1.6rem; margin: 4px 0; }
.wx .t { font-weight: 700; }
.wx .t small { color: var(--muted); font-weight: 500; }

/* Quiz */
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.q .q-text { font-weight: 700; margin-bottom: 10px; }
.opt { display: block; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer; }
.opt input { margin-right: 8px; }
.opt.sel { border-color: var(--brand); background: #e6f4f1; }

.btn {
  display: inline-block; background: var(--brand); color: #fff; border: none;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  cursor: pointer; text-decoration: none; margin: 8px 0;
}
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }

.result { background: #e6f4f1; border: 1px solid var(--brand); border-radius: var(--radius);
  padding: 16px; margin: 14px 0; }

.back { display: inline-block; margin-bottom: 8px; color: var(--muted); text-decoration: none; font-weight: 600; }

.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }
.footer code { background: #eceeec; padding: 1px 6px; border-radius: 6px; }

.empty { color: var(--muted); font-style: italic; }

/* profile banner on trip page */
.profile-banner { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px;
  padding: 10px 12px; margin: 8px 0 4px; font-size: .9rem; font-weight: 600; color: #92600a; }

/* itinerary map link */
.map-link { text-decoration: none; margin-left: 6px; font-size: .95rem; }

/* packing checklist */
.pack { display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-top: 1px solid var(--line); cursor: pointer; }
.pack:first-of-type { border-top: none; }
.pack input { width: 20px; height: 20px; accent-color: var(--brand); flex: 0 0 auto; }
.pack.done span { text-decoration: line-through; color: var(--muted); }

/* budget */
.budget-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0; box-shadow: var(--shadow); }
.budget-amt { font-weight: 700; white-space: nowrap; }
.budget-row.total { background: #e6f4f1; border-color: var(--brand); }
.budget-row.total .budget-amt { color: var(--brand-ink); font-size: 1.1rem; }
