/* Voyage — same bones as the other apps on the box: tonal dark/light, one accent
   drawn from the app's own icon ink, rounded 14px cards, a gear top right. */

:root {
  --bg: #0e1114;
  --card: #171b20;
  --card-2: #20262d;
  --line: #2b323a;
  --text: #e9edf2;
  --dim: #929ba7;
  --accent: #8fc3c0;      /* the icon's ink, lifted for dark */
  --accent-ink: #0e1114;
  /* The shared names the rest of the box uses, so a change made in one app
     reads the same here: spot for a second highlight, good/warm/bad for the
     three states. Voyage uses warm for "this was guessed, check it". */
  --spot: #7aa2ff;
  --good: #4ade80;
  --warm: #ffb340;
  --bad: #ff6b6b;
  --radius: 14px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7f8; --card: #fff; --card-2: #eef1f4; --line: #dee3e9;
    --text: #14181d; --dim: #667085; --accent: #3c6f6b; --accent-ink: #fff;
    --warm: #8a6524;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { color-scheme: dark light; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
main { max-width: 680px; margin: 0 auto; padding: 8px 14px calc(24px + env(safe-area-inset-bottom)); overflow-x: hidden; }
body { overflow-x: hidden; }
main.narrow { max-width: 420px; padding-bottom: 24px; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ----------------------------------------------------------------- topbar */

.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 0 14px; }
.topbar .mark { width: 40px; height: 40px; border-radius: 11px; flex: 0 0 auto; }
.topbar .title { flex: 1; min-width: 0; }
.topbar h1 {
  margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.015em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sub { color: var(--dim); font-size: 13px; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub .sep { margin: 0 4px; opacity: .6; }
.topbar .nav {
  flex: 0 0 42px; height: 42px; display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: var(--card); border: 0; border-radius: 12px; padding: 0;
}
.topbar .nav svg { width: 22px; height: 22px; }
.topbar .nav:active { transform: scale(.95); }

/* ---------------------------------------------------------------- buttons */

.btn {
  min-height: 46px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  border-radius: 11px; font: inherit; font-weight: 550; padding: 0 16px;
  user-select: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.wide { width: 100%; margin-top: 8px; }
.btn.danger { color: var(--bad); background: transparent; }

.mini {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border: 0; background: none; color: var(--dim); border-radius: 10px; padding: 0; list-style: none;
}
.mini::-webkit-details-marker { display: none; }
.mini svg { width: 20px; height: 20px; }
.mini:active { background: var(--card-2); color: var(--text); }
.mini.danger { color: var(--bad); }

/* ------------------------------------------------------------------ forms */

/* A missing type is a text input too; CSS attribute selectors do not apply
   the browser's default type automatically. Keep both forms styled alike. */
input:not([type]), input[type=email], input[type=text], input[type=tel], input[type=date], input[type=time], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--card-2);
  color: var(--text); border-radius: 11px; padding: 10px 14px; min-height: 46px; font: inherit;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 10px; }
label input, label select, label textarea { margin-top: 5px; color: var(--text); }
.pair { display: flex; gap: 8px; }
.pair label { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 14px; }
.check input { width: auto; min-height: 0; margin: 0; }
.newtoken { display: flex; gap: 8px; margin-bottom: 12px; }
.newtoken input { flex: 1; }
.newtoken .btn { flex: 0 0 auto; }
.filepick {
  display: block; border: 1.5px dashed var(--line); border-radius: 11px;
  padding: 14px; text-align: center; cursor: pointer; margin: 10px 0;
}
.filepick input { display: none; }
.filepick span { color: var(--dim); font-size: 13.5px; }
.filepick:hover { border-color: var(--accent); }

/* ------------------------------------------------------------------ sheet */

/* Lifted from Diary, deliberately unchanged: a panel that rises from the bottom
   on a phone and centres on a wide screen, over a backdrop. A <dialog> would
   have given Escape and the backdrop for free, but no other app on the box uses
   one, and a modal that animates and sits differently from every other modal is
   exactly the kind of small divergence that makes a suite feel assembled from
   parts. Same markup, same class names, same behaviour. */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 30; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 92vh; overflow: auto;
  background: var(--card); border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 40px rgba(0,0,0,.35);
  animation: rise .18s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 520px; transform: translate(-50%, -50%);
           border-radius: 18px; animation: none; }
}
.sheet-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.sheet-title { flex: 1; margin: 2px 0 0; font-size: 19px; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.sheet .close {
  border: 0; background: var(--card-2); color: var(--dim); width: 34px; height: 34px; border-radius: 99px;
  font: inherit; font-size: 15px; cursor: pointer; flex: 0 0 34px;
}
.sheet-actions { display: flex; gap: 8px; margin-top: 16px; }
.sheet-actions .btn { flex: 1; min-height: 44px; }
.plan-choices { display: grid; gap: 10px; margin-top: 16px; }
.plan-choice { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.plan-choice > span:first-of-type { flex: 1; }
.plan-choice strong, .plan-choice small { display: block; }
.plan-choice small { color: var(--dim); font-size: 13px; margin-top: 4px; }
.plan-choice:hover, .plan-choice:focus-visible { border-color: var(--accent); }
[data-plan-form] { margin-top: 18px; }
[data-plan-form] label { margin-bottom: 16px; line-height: 1.4; }
[data-plan-form] label input, [data-plan-form] label textarea {
  display: block; width: 100%; min-width: 0; min-height: 48px;
  margin-top: 6px; font-size: 16px; line-height: 1.4;
}
[data-plan-form] textarea { min-height: 96px; }
[data-plan-form] .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
[data-plan-form] .hint { margin: -4px 0 16px; line-height: 1.5; }
@media (max-width: 359px) {
  [data-plan-form] .pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
.plan-error { color: var(--bad); }
.lookup { position: relative; }
.suggest { list-style: none; margin: 0; padding: 4px; position: absolute; left: 0; right: 0; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-height: 240px; overflow: auto; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); font: inherit; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.suggest button:hover, .suggest button:focus-visible { background: var(--card-2); }
.suggest strong { display: block; font-size: 15px; }
.suggest small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* A list of radio choices drawn as rows, for picking a trip to move to. */
.choices { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; cursor: pointer; margin: 0;
  padding: 10px 12px; border-radius: 11px; background: var(--card-2); color: var(--text); font-size: 15px;
}
.choice input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }
.choice span { display: grid; min-width: 0; }
.choice strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice small { color: var(--dim); font-size: 12.5px; }
.choice:has(input:checked) { outline: 2px solid var(--accent); outline-offset: -2px; }

/* -------------------------------------------------------------- trip photos */
.photo-upload { padding: 16px; margin: 16px 0; }
.photo-upload label { display: block; font-weight: 600; margin-bottom: 6px; }
.photo-upload input { display: block; width: 100%; min-width: 0; max-width: 100%; margin-bottom: 10px; font-size: 16px; }
.photo-upload .btn { margin-top: 10px; }
.photo-upload.compact { padding: 0; margin: 12px 0; }
.photo-upload.compact .btn { margin-top: 0; }
.photo-views { display: flex; gap: 6px; margin: 8px 0 12px; }
.photo-views a { padding: 8px 14px; border-radius: 8px; font-size: 13px; color: var(--dim); }
.photo-views a[aria-current] { background: var(--card-2); color: var(--text); font-weight: 650; }
.photo-upload-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.photo-upload-head label { margin: 0; }
.photo-help-trigger { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--dim); cursor: pointer; border-radius: 50%; list-style: none; }
.photo-help-trigger::-webkit-details-marker { display: none; }
.photo-help-trigger svg { width: 21px; height: 21px; }
.photo-help-trigger:hover, .photo-help[open] .photo-help-trigger { background: var(--card-2); color: var(--text); }
.photo-help-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-help-content { position: absolute; z-index: 10; right: 0; top: calc(100% + 4px); width: min(300px, calc(100vw - 72px)); max-height: min(65vh, 420px); overflow-y: auto; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 24px #0003; font-size: 13px; line-height: 1.5; color: var(--dim); }
.photo-help-content p + p { margin-top: 10px; }
.photo-help-content p:last-child { margin-bottom: 0; }
.photo-day { margin: 24px 0; scroll-margin-top: 16px; }
.photo-day h2 { font-size: 16px; margin-bottom: 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-tile { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--card); }
.photo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-full { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; border-radius: 10px; background: var(--card); }
.day-photos { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; }
.day-photos a { position: relative; flex: 0 0 80px; }
.day-photos img { display: block; width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.day-photos-link { display: inline-block; font-size: 13px; padding: 8px 0; }
.video-badge { position: absolute; z-index: 1; right: 5px; bottom: 5px; padding: 2px 6px; border-radius: 5px; color: white; background: #000b; font-size: 12px; }
.map.photo-map { height: 60vh; }
.photo-map .leaflet-popup-content-wrapper, .photo-map .leaflet-popup-tip { background: var(--card); color: var(--text); }
.photo-map-marker { border: 0; background: none; }
.photo-map-cover { position: relative; width: 56px; height: 56px; border: 3px solid white; border-radius: 9px; box-shadow: 0 2px 8px #0006; background: var(--card); }
.photo-map-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.photo-map-cover span { position: absolute; right: -6px; top: -8px; min-width: 22px; padding: 2px 5px; border-radius: 12px; color: white; background: #263d38; text-align: center; font-size: 12px; font-weight: 700; }
.photo-map-popup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 270px; overflow-y: auto; width: min(240px, 60vw); }
.photo-map-popup-grid a { display: block; }
.photo-map-popup-grid img { display: block; width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.photo-map-popup-grid span { display: block; font-size: 11px; margin-top: 4px; }
.photo-map-popup .btn { margin-top: 8px; }
.map-photo-list { margin-top: 12px; }

/* ----------------------------------------------------------------- switch */

.switch {
  display: flex; gap: 3px; margin: 0 0 12px; padding: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.switch a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 4px; border-radius: calc(var(--radius) - 3px);
  font-size: 13.5px; font-weight: 600; color: var(--dim);
}
.switch a svg { width: 16px; height: 16px; }
.switch a.on { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 360px) { .switch a { gap: 3px; font-size: 12px; } .switch a svg { width: 14px; flex-shrink: 0; } }

.caption { color: var(--dim); font-size: 12.5px; margin: 14px 0 6px; padding: 0 2px; }

/* ------------------------------------------------------------------ cards */

.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; display: block; }
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0 0 6px; }
.card.muted { opacity: .8; }
.hint { color: var(--dim); font-size: 13px; }
.centred { text-align: center; }

/* The next trip. Bigger than everything under it, on purpose. */
.upnext { border: 1px solid var(--line); }
.upnext .countdown {
  color: var(--accent); font-size: 12.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px;
}
.upnext h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 2px; }
.upnext.now { border-color: var(--accent); }
.upnext.with-cover { position: relative; overflow: hidden; min-height: 230px; display: flex; align-items: flex-end; background: #263d3b; }
.upnext-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upnext.with-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.82)); }
.upnext-text { position: relative; z-index: 1; }
.upnext.with-cover h2, .upnext.with-cover .countdown, .upnext.with-cover .sub, .upnext.with-cover .hint { color: #fff; }
.cover-label { display: inline-block; color: #fff; background: rgba(0,0,0,.55); border-radius: 4px; padding: 2px 6px; font-size: 11px; }
.trip-thumb { width: 76px; height: 58px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; background: var(--card-2); }

.empty { text-align: center; color: var(--dim); padding: 48px 20px 30px; }
.empty svg { width: 44px; height: 44px; opacity: .5; stroke-width: 1.4; margin-bottom: 8px; }
.empty p { margin: 4px 0; }

/* ---------------------------------------------------------------- listing */

.listing { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 2px; padding: 0 6px 0 0; min-height: 60px; }
.row + .row { border-top: 1px solid var(--line); }
.row .main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; }
.row .main:active { background: var(--card-2); }
.row .txt { min-width: 0; display: grid; }
.row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.row .meta { color: var(--dim); font-size: 12.5px; }

.glyph { width: 26px; height: 26px; flex: 0 0 auto; color: var(--dim); stroke-width: 1.6; }
.glyph.flight { color: var(--accent); }
.glyph.lodging { color: #d3a06a; }
.glyph.car { color: #b39ad8; }
.glyph.rail, .glyph.ferry { color: #7fb2a3; }
.glyph.activity { color: #d38b8b; }
.glyph.key, .glyph.ok { color: var(--accent); }
.glyph.now { color: var(--accent); }
.glyph.past { opacity: .45; }

/* ------------------------------------------------------------------- days */

.day { margin: 0 0 6px; }
.dayhead {
  display: flex; align-items: baseline; gap: 10px;
  padding: 16px 2px 8px; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.dayhead h2 { margin: 0; font-size: 14px; font-weight: 650; color: var(--dim); letter-spacing: .01em; }
.day.today .dayhead h2 { color: var(--accent); }
.wx { margin-left: auto; font-size: 13px; color: var(--dim); }
.wx .lo { opacity: .6; }

/* One booked thing. Time in a fixed gutter so the column reads as a schedule. */
.seg {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border-radius: var(--radius); padding: 12px 6px 12px 14px; margin-bottom: 6px;
}
.seg .time { flex: 0 0 62px; display: grid; gap: 2px; padding-top: 1px; }
.seg .time .t { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.seg .time .t.end { color: var(--dim); font-weight: 500; font-size: 13px; }
.seg .time sup { font-size: 9px; margin-left: 1px; color: var(--warm); }
.seg .body { flex: 1; min-width: 0; display: block; }
.seg a.body:active { opacity: .7; }
.seg .line { display: flex; align-items: center; gap: 9px; }
.seg .line .glyph { width: 19px; height: 19px; }
.seg .nm { font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.seg .meta { color: var(--dim); font-size: 12.5px; margin: 3px 0 0; }
.seg .route { font-size: 13px; margin: 4px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.seg .route .dim { color: var(--dim); font-size: 12px; }
.seg .status { font-size: 12.5px; margin: 4px 0 0; color: var(--accent); }
.seg .review { font-size: 12.5px; margin: 5px 0 0; color: var(--warm); }

.night {
  display: flex; align-items: center; gap: 9px; margin: 0 0 6px;
  padding: 9px 14px; border-radius: var(--radius);
  border: 1px dashed var(--line); color: var(--dim); font-size: 13px;
}
.night .glyph { width: 17px; height: 17px; }
.nothing { color: var(--dim); font-size: 13px; padding: 4px 2px 10px; opacity: .6; }

.more { position: relative; }
.more[open] .mini { background: var(--card-2); color: var(--text); }
.menu {
  position: absolute; right: 0; top: 44px; z-index: 6; min-width: 150px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 6px; display: grid; gap: 2px;
}
.menu form { margin: 0; display: contents; }
.menu button {
  text-align: left; width: 100%; border: 0; background: none; color: var(--text);
  font: inherit; padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.menu button.bad { color: var(--bad); }

/* The settings gear and its menu. The summary IS the .nav button, so it sits
   in the topbar like the back arrow and the plus; the menu is wider and gets
   icons because these are destinations, not actions on one row. */
/* The flex child is the <details>, not the summary, so the size the .nav rule
   gives via flex-basis lands on the wrong element. Stated explicitly on both:
   the details is 42px wide in the row, and the summary fills it as a square
   identical to the plus beside it. */
.settings { flex: 0 0 42px; width: 42px; height: 42px; }
.settings summary { list-style: none; display: grid; place-items: center; width: 42px; height: 42px; }
.settings summary::-webkit-details-marker { display: none; }
.settings[open] summary { background: var(--card-2); }
.settings .menu { min-width: 200px; top: 48px; }
.settings .menu a, .settings .menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 0; background: none; color: var(--text); font: inherit; padding: 11px 12px;
  border-radius: 8px; cursor: pointer;
}
.settings .menu a:hover, .settings .menu a:active, .settings .menu button:hover { background: var(--card); }
.settings .menu svg { width: 19px; height: 19px; color: var(--dim); flex: 0 0 auto; }

/* ------------------------------------------------------------- trip hero */

/* The destination photograph as the title block. Full-bleed out of main's
   padding, so it meets the edges of the screen the way a cover should. */
.hero-trip { position: relative; margin: -8px -14px 14px; overflow: hidden; border-radius: 0 0 var(--radius) var(--radius); }
.hero-trip img { display: block; width: 100%; height: 210px; object-fit: cover; background: var(--card-2); }
.hero-trip::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0 22%, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%);
}
.hero-bar { position: absolute; inset: 0 0 auto 0; z-index: 2; display: flex; justify-content: space-between; padding: 10px 14px; }
/* Stated in full, not inherited: the .nav rules are scoped to .topbar, and a
   back arrow with no box at all is invisible against a night sky. */
.hero-bar .nav, .hero-bar .settings summary {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center;
  border: 0; border-radius: 12px; padding: 0; cursor: pointer; list-style: none;
  background: rgba(0,0,0,.42); color: #fff; backdrop-filter: blur(6px);
}
.hero-bar .nav svg, .hero-bar .settings summary svg { width: 22px; height: 22px; }
.hero-bar .nav:active, .hero-bar .settings summary:active { transform: scale(.95); }
.hero-bar .settings { width: 40px; height: 40px; flex: 0 0 40px; }
.hero-bar .settings .menu { color: var(--text); }
.hero-text { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 14px; color: #fff; }
.hero-text h1 { margin: 0; font-size: 25px; font-weight: 680; letter-spacing: -.02em; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero-text .sub { color: rgba(255,255,255,.88); margin-top: 3px; text-shadow: 0 1px 10px rgba(0,0,0,.5); }

/* ------------------------------------------------------------------- map */

.map { height: 46vh; min-height: 280px; border-radius: var(--radius); overflow: hidden; background: var(--card-2); margin-bottom: 8px; }
.leaflet-container { font: inherit; }
.leaflet-popup-content { font-size: 13.5px; line-height: 1.4; }
.leaflet-popup-content a { color: var(--accent); }

/* ---------------------------------------------------------------- detail */

.notice { padding: 12px 16px; border: 1px solid var(--warm); }
.notice p { margin: 0; font-size: 14px; }
.when .line { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.when .kind { color: var(--dim); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.when .times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.when .caption { margin: 0 0 2px; }
.when .big { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin: 0; font-variant-numeric: tabular-nums; }
.when .big sup { font-size: 11px; color: var(--warm); margin-left: 2px; }
.when .hint { margin: 2px 0 6px; }
.when .place { margin: 0; font-size: 13.5px; }
.when .place strong { font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 14px; }
.facts dt { color: var(--dim); font-size: 13px; }
.facts dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.stack { display: grid; gap: 8px; }
.stack .btn { margin: 0; }
.actions { margin-bottom: 14px; }

/* The boarding pass. */
.pass .legs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.pass .code { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 0; line-height: 1; }
.pass .city { color: var(--dim); font-size: 12.5px; margin: 4px 0 10px; min-height: 2.6em; overflow: hidden; }
.pass .big { font-size: 22px; font-weight: 650; margin: 0; font-variant-numeric: tabular-nums; }
.pass .big sup { font-size: 11px; color: var(--warm); margin-left: 2px; }
.pass .hint { margin: 2px 0 0; }
.pass .leg:last-child { text-align: right; }
.pass .arrow { display: grid; place-items: center; gap: 4px; padding-top: 6px; color: var(--accent); font-size: 11.5px; }
.pass .arrow svg { width: 22px; height: 22px; }
.pass .status { margin: 12px 0 0; font-size: 12.5px; color: var(--accent); }

/* The reservation. */
.stay h2 { margin: 0 0 2px; font-size: 20px; }
.stay .addr { color: var(--dim); font-size: 13.5px; margin: 0 0 12px; }
.stay .times { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.stay .caption { margin: 0 0 2px; }
.stay .big { font-size: 22px; font-weight: 650; margin: 0; font-variant-numeric: tabular-nums; }
.stay .hint { margin: 2px 0 0; }
.rating { font-size: 15px; font-weight: 600; color: var(--warm); margin: 0 0 8px; }
.review p { margin: 0 0 6px; font-size: 14px; }
.photos { display: flex; gap: 6px; overflow-x: auto; margin: 0 -14px 4px; padding: 0 14px; scroll-snap-type: x mandatory; }
.photos a { flex: 0 0 auto; scroll-snap-align: start; }
.photos img { height: 150px; width: auto; border-radius: 11px; display: block; background: var(--card-2); }
.attrib { font-size: 10.5px; color: var(--dim); opacity: .7; margin: 0 0 12px; }

/* ------------------------------------------------------------------- chat */

.thread { display: grid; gap: 8px; padding: 4px 0 12px; }
.msg { max-width: 86%; background: var(--card); border-radius: 16px; padding: 10px 14px; justify-self: start; }
.msg.mine { background: var(--accent); color: var(--accent-ink); justify-self: end; }
.msg p { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.45; }
.ask { display: flex; gap: 8px; position: sticky; bottom: env(safe-area-inset-bottom); background: var(--bg); padding: 8px 0; }
.ask input { flex: 1; }
.ask .btn { flex: 0 0 auto; }

/* ------------------------------------------------------------------ ideas */

.ideas { margin-bottom: 18px; }
.ideas h2 { font-size: 14px; color: var(--dim); font-weight: 650; margin: 14px 2px 8px; }
.idea {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--card); border-radius: var(--radius); padding: 12px 6px 12px 14px; margin-bottom: 6px;
}
.idea .body { flex: 1; min-width: 0; }
.idea .nm { font-weight: 550; margin: 0; }
.idea .nm a { border-bottom: 1px solid var(--line); }
.idea .meta { color: var(--dim); font-size: 13px; margin: 3px 0 0; }
.idea .hint { margin: 4px 0 0; color: var(--accent); }
.idea .attrib { font-size: 10.5px; color: var(--dim); opacity: .6; margin: 5px 0 0; }
.idea .pick { display: flex; flex: 0 0 auto; }
.idea.top { flex-wrap: wrap; }
.idea .pic { flex: 0 0 100%; margin: -12px -6px 10px -14px; width: calc(100% + 20px); }
.idea .pic img { display: block; width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; background: var(--card-2); }
.idea.top .body { flex: 1; }
.idea .tours { font-size: 12.5px; color: var(--dim); margin: 6px 0 0; }
.idea .tours a { margin-left: 8px; color: var(--accent); font-weight: 600; }

.email-forwarding { padding: 16px; margin-bottom: 16px; }
.forwarding-address { font-size: clamp(16px, 4.5vw, 23px); font-weight: 650; overflow-wrap: anywhere; }
.email-forwarding .hint { margin-top: 12px; }
.email-deliveries { margin: 16px 0; }

.login-card { margin-top: 22px; }
.login-card .hint { margin: 12px 0; }
.otp-code { text-align: center; letter-spacing: .18em; font-size: 22px !important; }
.import-review { margin-top: 16px; }
.import-item { border-top: 1px solid var(--line); padding: 14px 0; }
.import-item details summary { padding: 8px 0; cursor: pointer; }
.assignment-form { margin: 12px 0; }
.assignment-form .check { min-height: 44px; }
.assignment-form .check span, .traveller-card p { min-width: 0; overflow-wrap: anywhere; }
.assignment-form small { display: block; }
.traveller-card .pair { flex-wrap: wrap; }
.traveller-card .pair form { flex: 1; min-width: 150px; }
.menu > a { display: block; padding: 10px 12px; color: var(--text); }

/* ----------------------------------------------------------------- tokens */

.fresh { border: 1px solid var(--accent); }
.token {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: copy;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 11px; padding: 12px 14px; margin: 10px 0; font: inherit;
}
.token code { flex: 1; word-break: break-all; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.token .copied { font-size: 12px; color: var(--accent); opacity: 0; transition: opacity .2s; }
.token.done .copied { opacity: 1; }
.howto summary { cursor: pointer; color: var(--dim); font-size: 13px; }
.howto pre {
  margin: 10px 0 0; background: var(--card-2); border-radius: 10px; padding: 12px;
  overflow-x: auto; font-size: 12.5px; line-height: 1.5;
}
.tripedit { margin-top: 22px; }
.tripedit summary { cursor: pointer; padding: 8px 2px; }
.tripedit .card { margin-top: 10px; }

/* ------------------------------------------------------------------- hero */

.hero { text-align: center; padding: 48px 0 24px; }
.hero .mark img { border-radius: 17px; }
.hero h1 { margin: 14px 0 6px; font-size: 24px; }
.hero .sub { white-space: normal; }
