/* Palette carried over from trips v1 so the two sites read as one thing. */
:root {
  --bg: #0e1116;
  --panel: #151a21;
  --panel-2: #1b222b;
  --line: #262f3b;
  --text: #e6ebf2;
  --muted: #8d9bad;
  --accent: #6ea8fe;
  --accent-soft: rgba(110, 168, 254, 0.14);

  --ok: #5fd6a6;
  --warn: #ffb15c;
  --bad: #ff8fa3;

  --k-travel: #7cc2ff;
  --k-lodging: #b39cf7;
  --k-food: #ffb15c;
  --k-sight: #5fd6a6;
  --k-event: #ff8fa3;
  --k-free: #9aa7b8;

  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 ui-sans-serif, -apple-system, "SF Pro Text", Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px 64px; }

/* ---------- header ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.topbar h1 a { color: var(--text); }
.topbar .dates { color: var(--muted); font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

.tabs {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 13px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- structure ---------- */

h2 { font-size: 17px; margin: 28px 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 15px; margin: 0 0 6px; }
.sub { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.muted { color: var(--muted); }
.right { text-align: right; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card.booked { border-color: var(--ok); box-shadow: 0 0 0 1px rgba(95, 214, 166, 0.25); }
.card.rejected { opacity: 0.55; }
.card-head { display: flex; gap: 12px; align-items: flex-start; }
.card-head .grow { flex: 1; min-width: 0; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 8px; }

/* ---------- numbers ---------- */

.stat {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat .k { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .v { font-size: 22px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat .v.small { font-size: 17px; }

.money-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.money-table td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.money-table tr:last-child td { border-bottom: 0; }
.money-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.money-table .headline td { font-size: 16px; }

/* ---------- chips / badges ---------- */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
}
.badge.rsvp-in     { color: var(--ok);   border-color: rgba(95,214,166,.4); }
.badge.rsvp-maybe  { color: var(--warn); border-color: rgba(255,177,92,.4); }
.badge.rsvp-out    { color: var(--bad);  border-color: rgba(255,143,163,.4); }
.badge.status-booked   { color: var(--ok);   border-color: rgba(95,214,166,.4); }
.badge.status-proposed { color: var(--accent); border-color: rgba(110,168,254,.4); }
.badge.status-rejected { color: var(--bad);  border-color: rgba(255,143,163,.4); }
.badge.status-planned  { color: var(--ok);   border-color: rgba(95,214,166,.4); }
.badge.status-idea     { color: var(--accent); border-color: rgba(110,168,254,.4); }
.badge.status-dropped  { color: var(--muted); }
.badge.warn { color: var(--warn); border-color: rgba(255,177,92,.4); }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #0e1116;
  font-size: 11px;
  font-weight: 650;
  flex: none;
}
.avatar-row { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }

/* ---------- forms + buttons ---------- */

.btn {
  display: inline-block;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b1017; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 68px; }
.field { margin-bottom: 12px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 130px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.check label { margin: 0; }

/* ---------- rooms table ---------- */

.rooms { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.rooms td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rooms .room-name { color: var(--muted); width: 38%; }
.rooms .room-beds { width: 40%; }
.rooms .room-sleeps { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rooms .rooms-total td { border-bottom: 0; border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- verdict + bullets ---------- */

.verdict {
  margin: 10px 0 4px;
  font-size: 15px;
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 11px;
}
.open-q { margin-top: 8px; }

.bullets { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.bullets li { margin-bottom: 3px; }
.bullets.good li::marker { color: var(--ok); content: "+ "; }
.bullets.bad li::marker { color: var(--bad); content: "− "; }
.bullets.good, .bullets.bad { list-style-position: outside; }

/* ---------- hero + day timeline ---------- */

.hero { padding: 26px 0 6px; }
.hero-line { font-size: 25px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.02em; }
.hero-body { margin: 0 0 10px; font-size: 15px; line-height: 1.6; color: #c8d2e0; max-width: 62ch; }

.days { display: grid; gap: 12px; }
.day {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.day-head { font-size: 15px; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: flex;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}
.timeline li:first-child { border-top: 0; }
.timeline .when {
  flex: 0 0 116px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.timeline .what { flex: 1; min-width: 0; }
.timeline li.nested { padding-left: 18px; border-top-style: dashed; }
.timeline li.nested .when, .timeline li.fixture .when { opacity: 0.72; }
.timeline li.fixture .what { color: var(--muted); }
.timeline li.clash .what { color: var(--bad); }

.big-number { font-size: 30px; margin: 12px 0 2px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big-number .muted { font-size: 15px; letter-spacing: 0; }

/* ---------- pick-one options ---------- */

.options { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 8px; }
.options > li {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--k-free);
  border-radius: 8px;
  padding: 9px 11px;
}
.option-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ---------- press to copy ---------- */

.copyable {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.copyable code {
  flex: 1;
  min-width: 0;
  background: var(--panel-2);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  word-break: break-all;
  font-size: 13px;
  line-height: 1.4;
  /* One tap selects the whole thing if the copy button ever fails. */
  user-select: all;
}
.copy-btn { flex: 0 0 auto; align-self: stretch; min-width: 92px; }
.copy-btn.copied {
  color: var(--ok);
  border-color: rgba(95, 214, 166, 0.5);
  background: rgba(95, 214, 166, 0.1);
}

@media (max-width: 520px) {
  .hero-line { font-size: 21px; }
  .timeline li { flex-direction: column; gap: 2px; }
  .timeline .when { flex: none; }
}

/* ---------- password reveal ---------- */

.reveal-wrap { position: relative; display: flex; align-items: center; }
.reveal-wrap input { padding-right: 66px; }
.reveal-btn {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
}
.reveal-btn:hover { color: var(--text); background: var(--panel-2); }

/* ---------- votes ---------- */

.votes { display: inline-flex; gap: 6px; align-items: center; }
.vote-btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 8px;
  padding: 3px 9px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.vote-btn:hover { border-color: var(--accent); color: var(--text); }
.vote-btn.mine-up   { color: var(--ok);  border-color: rgba(95,214,166,.5); background: rgba(95,214,166,.1); }
.vote-btn.mine-down { color: var(--bad); border-color: rgba(255,143,163,.5); background: rgba(255,143,163,.1); }

/* ---------- comments ---------- */

.comments { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.comment { display: flex; gap: 9px; padding: 7px 0; }
.comment .body { flex: 1; min-width: 0; }
.comment .meta { font-size: 12px; color: var(--muted); }
.comment .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form textarea { min-height: 38px; }

/* ---------- seats ---------- */

.seats { display: flex; gap: 5px; flex-wrap: wrap; margin: 10px 0; }
.seat {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 650;
}
.seat.empty { border-style: dashed; color: var(--muted); font-weight: 400; }
.seat.driver { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- flash / auth ---------- */

.flash { padding: 10px 14px; border-radius: 8px; margin: 14px 0; font-size: 14px; border: 1px solid; }
.flash-ok  { border-color: rgba(95,214,166,.4);  background: rgba(95,214,166,.08); color: var(--ok); }
.flash-bad { border-color: rgba(255,143,163,.4); background: rgba(255,143,163,.08); color: var(--bad); }

.auth { max-width: 380px; margin: 8vh auto; padding: 0 20px; }
.auth h1 { font-size: 21px; margin: 0 0 4px; }
.auth .card { padding: 20px; }

.roster-pick { display: grid; gap: 8px; }
.roster-pick a, .roster-pick .taken {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
}
.roster-pick a:hover { border-color: var(--accent); text-decoration: none; }
.roster-pick .taken { opacity: .5; }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.ext { font-size: 13px; }
.inline-form { display: inline; }

/* The headcount picker is the main control on the Stay page. On a phone the
   inline label stole enough width to wrap the buttons onto three lines, so the
   label gets its own row and the buttons stay together. */
.tier-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; }
.tier-label { margin: 0; }
@media (max-width: 520px) {
  .tier-label { flex: 0 0 100%; margin-bottom: 2px; }
}

/* Phones: 26-30px buttons are hard to hit. Apple's guidance is 44px, so grow
   every tap target on touch devices without changing the desktop layout. */
@media (hover: none) and (pointer: coarse) {
  .btn, .vote-btn { min-height: 44px; display: inline-flex; align-items: center; }
  .btn.small, .vote-btn { padding: 10px 14px; font-size: 14px; }
  .tab { padding: 14px 15px; }
  input[type=text], input[type=password], input[type=email], input[type=url],
  input[type=number], input[type=date], input[type=datetime-local], select, textarea {
    min-height: 44px;
    font-size: 16px; /* under 16px, iOS Safari zooms the page on focus */
  }
  .badge { font-size: 13px; padding: 3px 10px; }
  .comment-form textarea { min-height: 44px; }
}

@media (max-width: 620px) {
  .topbar-inner { padding: 12px 16px; }
  .wrap { padding: 0 16px 48px; }
  .card-head { flex-direction: column; }
}
