:root {
  --bg: #f7f1e8;
  --bg-header: #fbf6ee;
  --bg-card: #fffdf8;
  --bg-soft: #f7f1e8;
  --accent: #b4574e;
  --accent-hover: #9c4a42;
  --text: #3a3129;
  --text-muted: #8a7d6d;
  --text-faint: #a99b87;
  --text-chip: #4d4338;
  --text-chip-soft: #6b5f51;
  --danger: #a3452f;
  --warn-bg: #f3ead9;
  --warn-border: rgba(160, 120, 60, .3);
  --warn-text: #6b5a3e;
  --theme-bg: #f1e6d6;
  --theme-text: #8a7159;
  --dest-dot: #7a648c;
  --match-bg: #fdf6f5;
  --cd-upcoming-bg: #f6e0dc;
  --cd-now-bg: #e5f1e3;
  --cd-now-text: #4a7a45;
  --cd-done-bg: #eee7db;
  --serif: 'Cormorant Garamond', serif;
  --sans: Karla, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

::placeholder { color: #b5a894; }

button, input, select { font-family: var(--sans); }

@keyframes vmPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes vmFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes vmHeartbeat { 0%, 28%, 100% { transform: scale(1); } 10% { transform: scale(1.22); } 20% { transform: scale(1.08); } }
@keyframes vmSplashIn { from { opacity: 0; transform: scale(.92) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes vmDot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
/* opacity-only entrance for the trip view: it holds position:sticky children
   (header island, date headers), and a lingering `transform: translateY(0)`
   from a fill-mode animation would establish a containing block that breaks
   their stickiness. Home/login keep the translateY rise (no sticky inside). */
@keyframes vmViewIn { from { opacity: 0; } to { opacity: 1; } }

a { color: inherit; }

button { transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .08s ease; }
button:active { transform: scale(.96); }
.trip-card, .idea-card, .dest-card { transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }

/* The entrance fade plays only when the *view* changes (login → home,
   home → trip, …), never on data/poll re-renders — a blanket `#app > *`
   animation would replay on every innerHTML swap and read as flashing.
   The header is deliberately excluded: it's persistent chrome shared by
   home and trip, and fading it on navigation would make it flicker. */
#app.view-enter > .login-wrap,
#app.view-enter > .container-home { animation: vmFadeIn .35s ease both; }
#app.view-enter > .container-trip { animation: vmViewIn .35s ease both; }

.boot-loader { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.boot-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff7f0;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif);
  font-size: 15px; font-weight: 600; opacity: .5; animation: vmPulse 1.2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; padding: 18px 28px;
  border-bottom: 1px solid rgba(58, 49, 41, .09);
  background: rgba(251, 246, 238, .82);
  backdrop-filter: saturate(1.1) blur(12px); -webkit-backdrop-filter: saturate(1.1) blur(12px);
}
/* solid fallback where backdrop-filter isn't supported, so content never
   shows through the sticky bar */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header { background: var(--bg-header); }
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff7f0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.brand-name { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.05; }
.brand-tagline { font-size: 11.5px; color: var(--text-muted); letter-spacing: .04em; }
.reacting-as { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reacting-as-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted);
}

/* ---------- pill chip (toggles, filters) ---------- */
.chip {
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  font: 600 12.5px var(--sans); border: 1px solid rgba(58, 49, 41, .16);
  background: transparent; color: #6b5f51;
}
.chip.active { border-color: var(--accent); background: var(--accent); color: #fff7f0; }
.chip:hover:not(.active) { background: #f1e8da; }
.chip.fixed-identity { cursor: default; }
.heart-suffix { display: inline-block; animation: vmHeartbeat 2.6s ease-in-out infinite; }

.pill-btn {
  padding: 7px 14px; border: 1px solid rgba(58, 49, 41, .16); border-radius: 999px;
  background: transparent; color: #6b5f51; font: 600 12px var(--sans); cursor: pointer;
}
.pill-btn:hover { background: #f1e8da; }
.pill-btn-danger {
  border: 1px solid rgba(163, 69, 47, .35); color: var(--danger); background: transparent;
  border-radius: 999px; font: 600 11.5px var(--sans); cursor: pointer; padding: 7px 12px;
}
.pill-btn-danger:hover { background: #f6e3dd; }
.pill-btn-outline {
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  border-radius: 999px; font: 600 11.5px var(--sans); cursor: pointer; padding: 7px 14px;
}
.pill-btn-outline:hover { background: #f6e6e3; }
.btn-solid {
  border: none; border-radius: 999px; background: var(--accent); color: #fff7f0;
  font: 600 13px var(--sans); cursor: pointer; padding: 10px 18px;
}
.btn-solid:hover { background: var(--accent-hover); }
.btn-solid:disabled { opacity: .6; cursor: default; }

/* ---------- form inputs ---------- */
.input {
  padding: 9px 12px; border: 1px solid rgba(58, 49, 41, .18); border-radius: 10px;
  background: var(--bg-card); font: 400 13.5px var(--sans); color: var(--text);
}
.input:focus { outline: 2px solid rgba(180, 87, 78, .35); outline-offset: 1px; }

/* ---------- home ---------- */
.container-home { max-width: 1080px; margin: 0 auto; padding: 34px 28px 90px; }
.proto-banner {
  background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 14px;
  padding: 13px 18px; font-size: 12.5px; line-height: 1.6; color: var(--warn-text); margin-bottom: 22px;
}
.h1 { font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: 1.1; margin-bottom: 6px; }
.subhead { font-size: 14px; color: var(--text-muted); margin-bottom: 22px; }
.toggle-row { display: flex; gap: 8px; margin-bottom: 20px; }

.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.trip-card {
  cursor: pointer; background: var(--bg-card); border: 1px solid rgba(58, 49, 41, .1); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 3px rgba(58, 49, 41, .05);
  transition: border-color .15s, box-shadow .15s;
}
.trip-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(180, 87, 78, .13); }
.trip-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trip-card-badges { display: flex; align-items: center; gap: 8px; }
.trip-dates { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.countdown-pill { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.countdown-pill.trip-detail { font-size: 11px; }
.trip-route { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.15; }
.trip-description { font-size: 12.5px; line-height: 1.5; color: var(--text-chip-soft); }
.trip-dest-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trip-dest-chip {
  font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-chip-soft); border: 1px solid rgba(58, 49, 41, .08);
}
.trip-meta { font-size: 12.5px; color: var(--text-muted); }
.trip-reservation-badge { font-size: 11px; font-weight: 600; color: var(--accent); }

.new-trip-card {
  background: transparent; border: 1.5px dashed rgba(58, 49, 41, .22); border-radius: 16px;
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.new-trip-header { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.new-trip-dates { display: flex; gap: 8px; }
.new-trip-dates .input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 12.5px; }
.err-text { font-size: 12px; color: var(--danger); }
.archive-empty { font-size: 13.5px; color: var(--text-muted); padding: 24px 0; }

/* ---------- trip detail ----------
   Fixed-height layout: the trip header (.trip-top) stays put while only
   .trip-scroll scrolls. Its top edge is masked so the timeline fades into the
   header as it scrolls up. Home/login keep normal page scroll. */
#app.trip-view { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
#app.trip-view .header { flex: none; }
.container-trip {
  flex: 1; min-height: 0; width: 100%; max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; overflow: hidden; padding: 0 28px;
}
.trip-top { flex: none; padding: 20px 0 4px; }
.trip-scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 30px 0 90px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 38px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 38px);
  /* no visible scrollbar — modern, smooth, edge-to-edge */
  scrollbar-width: none; -ms-overflow-style: none;
}
.trip-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.trip-header-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 8px 0 4px; }
.trip-title { font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: 1.05; }
.trip-detail-description { font-size: 13.5px; line-height: 1.5; color: var(--text-chip-soft); margin-top: 6px; max-width: 520px; }
.trip-range-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.trip-range-label { font-size: 13px; font-weight: 600; color: var(--accent); }
.trip-date-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trip-date-controls .input { padding: 7px 10px; font-size: 12.5px; min-width: 0; }

.weather-chip {
  font: 500 11.5px var(--sans); color: var(--text-chip-soft); background: var(--bg-card);
  border: 1px solid rgba(58, 49, 41, .1); border-radius: 999px; padding: 4px 11px; white-space: nowrap;
}
.weather-chip b { color: var(--text); font-weight: 700; }

.inline-panel {
  background: var(--bg-card); border: 1px solid rgba(58, 49, 41, .14); border-radius: 16px;
  padding: 18px; margin-bottom: 16px;
}
.inline-panel-title { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.mode-chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.form-grid .input, .form-grid select { width: 100%; padding: 9px 10px; font-size: 13px; }
.dest-add-row { display: flex; gap: 10px; flex-wrap: wrap; }
.dest-add-row .input { flex: 1; min-width: 220px; padding: 11px 14px; font-size: 14px; border-radius: 12px; }

.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }

/* ---------- timeline ---------- */
/* padding-left carries a ~44px time gutter on top of the original 24px dot
   lane. The spine is shifted right by the same 44px; the dots keep their
   negative offsets (measured from the content box) so they stay on the spine
   automatically. --tl-pad / --spine-x let the mobile query shrink the gutter. */
.timeline { --tl-pad: 68px; --spine-x: 50px; position: relative; padding-left: var(--tl-pad); }
.timeline-spine {
  position: absolute; left: var(--spine-x); top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(rgba(58, 49, 41, .16), rgba(58, 49, 41, .04));
}
.timeline-item { position: relative; margin-bottom: 14px; }

/* One section per calendar day, with its date header. Headers scroll with the
   timeline and fade into the trip header via the .trip-scroll top mask. */
.timeline-section { position: relative; }
.date-header {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
  margin: 0 0 10px calc(-1 * var(--tl-pad, 68px)); padding: 4px 0 4px var(--tl-pad, 68px);
}
.timeline-empty { font-size: 13.5px; color: var(--text-muted); padding: 12px 0; }

/* hover-to-add gap between (and before) timeline items — no divider line, just
   a thin strip that reveals the "+" insert controls on hover */
.timeline-gap { position: relative; height: 10px; }
.gap-controls {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 6px; opacity: 0; transition: opacity .15s ease; z-index: 2;
}
.timeline-gap:hover .gap-controls, .timeline-gap.open .gap-controls { opacity: 1; }
.gap-add-btn {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  border: 1px dashed rgba(180, 87, 78, .45); background: var(--bg-card); color: var(--accent); cursor: pointer;
}
.gap-add-btn:hover { background: #f6e6e3; border-style: solid; }
.timeline-gap.open { height: auto; padding: 8px 0 2px; }
.timeline-gap.open .gap-controls { position: static; transform: none; opacity: 1; margin-bottom: 8px; }

/* Touch devices have no hover state to reveal the "+" controls with, and a
   tiny pill is hard to hit precisely with a finger — so on touch/coarse
   pointers the controls stay visible all the time and get bigger tap targets,
   while desktop keeps the quieter hover-reveal behavior. */
@media (hover: none), (pointer: coarse), (max-width: 480px) {
  .timeline-gap { height: 42px; }
  .gap-controls { opacity: 1; }
  .gap-add-btn { padding: 9px 15px; font-size: 13px; }
  /* touch has no reliable persistent :hover, so hover-to-reveal voting
     would otherwise need an odd "tap once to reveal, tap again to vote" */
  .vote-row { display: flex; }
}

/* travel leg */
.leg-dot {
  position: absolute; left: -24px; top: 14px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--bg); background: var(--accent);
}
.leg-row {
  cursor: pointer; background: var(--bg-header); border: 1px solid rgba(180, 87, 78, .2); border-radius: 11px;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.leg-row:hover { border-color: var(--accent); }
.leg-row.expanded { border-radius: 11px 11px 0 0; border-bottom-color: transparent; }
.leg-mode-icon { font-size: 15px; }
.leg-dir { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.leg-title { font: 600 14px var(--sans); }
.leg-spacer { flex: 1; }
.leg-expand-glyph { font-size: 13px; color: var(--text-muted); }

/* clock time in the timeline's left gutter, right-aligned against the spine */
.row-time {
  position: absolute; left: calc(-1 * var(--tl-pad, 68px)); top: 11px; width: calc(var(--tl-pad, 68px) - 30px);
  text-align: right; white-space: nowrap;
  font: 700 11.5px var(--sans); color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.leg-expanded {
  background: var(--bg-card); border: 1px solid rgba(58, 49, 41, .1); border-top: none;
  border-radius: 0 0 11px 11px; padding: 14px 16px; margin-top: -1px;
  display: flex; flex-direction: column; gap: 12px;
}
.leg-times-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.leg-times { font-size: 13px; color: var(--text-chip-soft); }
.remove-btn { border: none; background: transparent; color: var(--danger); font: 600 12px var(--sans); cursor: pointer; padding: 4px 8px; }

/* scheduled idea — a compact timeline point for an idea with a set time */
.sidea-item { margin-bottom: 9px; }
.sidea-dot {
  position: absolute; left: -21px; top: 9px; width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--bg); background: var(--theme-text);
}
.sidea-dot.match { background: var(--accent); }
.sidea-row {
  cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 13px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid rgba(58, 49, 41, .08);
}
.sidea-row:hover { border-color: rgba(58, 49, 41, .22); }
.sidea-row.match { background: var(--match-bg); border-color: rgba(180, 87, 78, .35); }
.sidea-title { font: 600 13px var(--sans); }
.sidea-heart { font-size: 12px; }
.sidea-theme {
  font-size: 9.5px; font-weight: 600; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px;
  background: var(--theme-bg); color: var(--theme-text);
}
.sidea-dest { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.sidea-item .row-time { top: 8px; color: var(--theme-text); }

/* new badge */
.new-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .07em; padding: 2px 7px; border-radius: 999px;
  background: var(--accent); color: #fff7f0; text-transform: uppercase;
}

/* destination */
.dest-dot {
  position: absolute; left: -27px; top: 16px; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--bg); background: var(--dest-dot);
}
.dest-card {
  background: var(--bg-card); border: 1px solid rgba(58, 49, 41, .12); border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 1px 4px rgba(58, 49, 41, .05);
}
.dest-card.clickable { cursor: pointer; }
.dest-card.clickable:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(180, 87, 78, .12); }
.dest-header {
  cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.dest-icon { font-size: 15px; }
.dest-title { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.match-badge { font-size: 11.5px; font-weight: 700; color: var(--accent); }
.idea-count { font-size: 12px; color: var(--text-muted); }
.dest-teaser {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.wiki-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.dest-teaser-text { font-size: 12.5px; line-height: 1.5; color: var(--text-chip-soft); }
.dest-expanded {
  margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(58, 49, 41, .08);
  display: flex; flex-direction: column; gap: 16px;
}
.dest-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* per-item date editor (travel legs + destinations) */
.item-date-wrap { display: inline-flex; align-items: center; gap: 6px; }
.item-date-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.item-date { padding: 5px 8px; font-size: 12px; }
.dest-add-date { min-width: 140px; }
.item-name-wrap { flex: 1; min-width: 160px; }
.item-name-edit { flex: 1; min-width: 140px; padding: 5px 8px; font: 600 13px var(--sans); }

/* stays (hotels) with mini website previews */
.stays-block { display: flex; flex-direction: column; gap: 10px; }
.stays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.stay-card {
  background: var(--bg-soft); border: 1px solid rgba(58, 49, 41, .08); border-radius: 12px;
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.stay-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stay-head-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.stay-name { font: 600 13px var(--sans); }
.stay-edit-actions { display: flex; gap: 8px; }
.stay-preview {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit;
}
.stay-thumb {
  width: 100%; height: 130px; object-fit: cover; border-radius: 9px;
  border: 1px solid rgba(58, 49, 41, .1); background: var(--bg-card);
}
.stay-desc { font-size: 12px; line-height: 1.5; color: var(--text-chip-soft); }
.stay-link { font: 600 11.5px var(--sans); color: var(--accent); text-decoration: none; align-self: flex-start; }
.stay-link:hover { text-decoration: underline; }
.stay-add-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stay-add-name { flex: 1; min-width: 150px; }
.stay-add-url { flex: 1.4; min-width: 180px; }

.ideas-block { border-top: 1px solid rgba(58, 49, 41, .08); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ideas-label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.ideas-empty { font-size: 12.5px; color: var(--text-faint); }

.idea-add-toggle { align-self: flex-start; }

/* idea card */
.idea-card {
  position: relative;
  background: var(--bg-soft); border: 1px solid rgba(58, 49, 41, .08); border-radius: 12px;
  padding: 13px; display: flex; flex-direction: column; gap: 8px;
}
.idea-card.match { background: var(--match-bg); border: 1.5px solid var(--accent); }
/* the scheduled time sits out in the timeline gutter, aligned to this card —
   the same lane as the marker it slides from when the destination opens.
   The extra offset past --tl-pad clears the destination card's own padding. */
.idea-card > .row-time { top: 13px; left: calc(-1 * var(--tl-pad, 68px) - 22px); color: var(--theme-text); }
.idea-top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.idea-title-wrap { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.idea-title { font: 600 15px var(--sans); }
.idea-location {
  display: inline-flex; align-items: center; gap: 3px; align-self: flex-start;
  font: 600 11.5px var(--sans); color: var(--text-chip-soft); text-decoration: none;
}
.idea-location:hover { color: var(--accent); text-decoration: underline; }
.idea-delete { border: none; background: transparent; color: #c2b5a3; font: 600 13px var(--sans); cursor: pointer; padding: 2px 4px; }
.idea-delete:hover { color: var(--danger); }
.idea-note { font-size: 12.5px; line-height: 1.5; color: var(--text-chip-soft); }
.idea-website-link { font: 600 11.5px var(--sans); color: var(--accent); text-decoration: none; align-self: flex-start; }
.idea-website-link:hover { text-decoration: underline; }
.idea-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px;
  background: var(--theme-bg); color: var(--theme-text);
}
.when-picker {
  padding: 4px 7px; border: 1px solid rgba(58, 49, 41, .16); border-radius: 8px;
  background: var(--bg-card); font: 500 11px var(--sans); color: var(--text-chip-soft);
}
.reservation-select {
  padding: 4px 7px; border: 1px solid rgba(58, 49, 41, .16); border-radius: 8px;
  background: var(--bg-card); font: 500 11px var(--sans); color: var(--text-chip-soft); cursor: pointer;
}
.reservation-select.reservation-needed { border-color: rgba(180, 87, 78, .5); color: var(--accent); background: var(--cd-upcoming-bg); }
.reservation-select.reservation-booked { border-color: rgba(74, 122, 69, .4); color: #4a7a45; background: var(--cd-now-bg); }
.votes-line { font-size: 11px; font-weight: 600; color: var(--text-chip-soft); }
.match-line { display: flex; align-items: center; gap: 6px; }
.match-line-icon { font-size: 15px; display: inline-block; animation: vmHeartbeat 2.6s ease-in-out infinite; }
.match-line-text { font-size: 11.5px; font-weight: 700; color: var(--accent); }
.split-line { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.waiting-line { font-size: 11px; color: var(--text-faint); }
.vote-row { display: none; align-items: center; gap: 6px; }
.idea-card:hover .vote-row { display: flex; }
.vote-btn {
  padding: 5px 11px; border-radius: 999px; cursor: pointer; font-size: 14px; background: transparent;
  border: 1px solid rgba(58, 49, 41, .14);
}
.vote-btn.love-active { border: 1.5px solid var(--accent); background: var(--cd-upcoming-bg); }
.vote-btn.nope-active { border: 1.5px solid var(--text-muted); background: var(--cd-done-bg); }

/* comment thread */
.comment-thread { display: flex; flex-direction: column; gap: 8px; }
.comment-list { display: flex; flex-direction: column; gap: 6px; }
.comment-item {
  font-size: 12px; line-height: 1.5; color: var(--text-chip); background: var(--bg-soft);
  border-radius: 9px; padding: 7px 10px; display: flex; align-items: flex-start; gap: 6px;
}
.comment-author { font-weight: 700; color: var(--accent); }
.comment-edit-btn {
  border: none; background: transparent; cursor: pointer; font-size: 11px; padding: 0 2px;
  margin-left: auto; opacity: .5; flex-shrink: 0;
}
.comment-edit-btn:hover { opacity: 1; }
.comment-item.comment-editing { padding: 4px; gap: 6px; background: transparent; }
.comment-edit-input {
  flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid rgba(58, 49, 41, .16); border-radius: 9px;
  background: var(--bg-card); font: 400 12px var(--sans); color: var(--text);
}
.comment-edit-save, .comment-edit-cancel {
  border: none; border-radius: 7px; cursor: pointer; font-size: 12px; padding: 5px 8px; flex-shrink: 0;
}
.comment-edit-save { background: var(--accent); color: #fff7f0; }
.comment-edit-cancel { background: transparent; color: var(--text-muted); }
.comment-input-row { display: flex; gap: 7px; }
.comment-input {
  flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid rgba(58, 49, 41, .16); border-radius: 9px;
  background: var(--bg-card); font: 400 12.5px var(--sans); color: var(--text);
}
.comment-post-btn {
  padding: 7px 13px; border: none; border-radius: 9px; background: var(--accent); color: #fff7f0;
  font: 600 11.5px var(--sans); cursor: pointer;
}
.comment-post-btn:hover { background: var(--accent-hover); }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  background: var(--bg-card); border: 1px solid rgba(58, 49, 41, .12); border-radius: 18px;
  padding: 34px 30px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 4px 20px rgba(58, 49, 41, .08);
}
.login-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff7f0;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 17px;
  font-weight: 600; margin: 0 auto 4px;
}
.login-title { font-family: var(--serif); font-size: 26px; font-weight: 600; text-align: center; }
.login-tagline { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: -8px; letter-spacing: .03em; }
.login-input { padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.login-error { font-size: 12.5px; color: var(--danger); text-align: center; animation: vmFadeIn .25s ease; }

/* ---------- splash / transition overlay ---------- */
.splash {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.splash[hidden] { display: none; }
.splash.visible { opacity: 1; pointer-events: auto; }
.splash-inner {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: vmSplashIn .55s cubic-bezier(.2, .7, .3, 1) both;
  padding: 0 24px; text-align: center;
}
.splash-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff7f0;
  display: flex; align-items: center; justify-content: center; font-family: var(--serif);
  font-size: 18px; font-weight: 600; animation: vmHeartbeat 2.2s ease-in-out infinite;
  box-shadow: 0 6px 24px rgba(180, 87, 78, .28);
}
.splash-title { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; }
.splash-sub { font-size: 12.5px; color: var(--text-muted); letter-spacing: .04em; margin-top: -6px; }
.splash-dots { display: flex; gap: 6px; margin-top: 6px; }
.splash-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: vmDot 1.15s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: .15s; }
.splash-dots span:nth-child(3) { animation-delay: .3s; }

@media (max-width: 480px) {
  .header { padding: 14px 16px; }
  .container-home { padding-left: 16px; padding-right: 16px; }
  .container-trip { padding-left: 16px; padding-right: 16px; }
  .h1 { font-size: 30px; }
  .trip-title { font-size: 30px; }

  /* narrower time gutter on small screens (kept wide enough that "19:20"
     still fits between the edge and the dot without clipping or overlap) */
  .timeline { --tl-pad: 60px; --spine-x: 42px; }
  .row-time { top: 10px; font-size: 10.5px; }
  .sidea-item .row-time { top: 7px; }

  /* iOS Safari auto-zooms in on focusing any form control smaller than
     16px, and often doesn't zoom back out on blur — that's the "stuck
     zoomed in, needs a pinch to undo it" bug. Every input/select/textarea
     needs to clear that threshold on small screens, whatever its desktop
     size is. */
  input, select, textarea { font-size: 16px !important; }

  /* the tightest controls also get a bit more breathing room so the now-
     bigger text still has a comfortable, easily-tappable box around it */
  .when-picker, .reservation-select, .item-date, .item-name-edit,
  .day-select, .comment-input, .comment-edit-input {
    padding-top: 8px; padding-bottom: 8px;
  }

  /* icon-only buttons (✕ delete, ✏️ edit) get a larger, more forgiving tap
     target instead of just their tight glyph bounding box */
  .idea-delete, .comment-edit-btn, .remove-btn {
    padding: 8px; min-width: 34px; min-height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .vote-btn { padding: 8px 13px; font-size: 16px; }

  /* two-per-row form fields just truncate their own placeholders at this
     width ("Fluggesellschaf…") — one full-width field per row reads properly */
  .form-grid { grid-template-columns: 1fr; }
}
