/* Flights & travel (flights.js, worldmap.js): always dark, like Flighty: the world map on top, the
   passport and your journeys sliding up over it. Sits above Trips (36) and the trip storybook (37),
   below the map (40), the viewer (50) and sheets (60). */

.fl-view {
  --fl-sea: #070b15; --fl-body: #0b1120; --fl-card: #111a2d; --fl-card2: #162036; --fl-line: #1f2a40;
  --fl-ink: #eef3ff; --fl-soft: #b7c3dc; --fl-muted: #8592ad; --fl-gold: #ffd84d; --fl-blue: #5cb8ff;
  background: var(--fl-sea); color: var(--fl-ink); z-index: 38; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain; color-scheme: dark;
  animation: rise .26s cubic-bezier(.2,.8,.2,1);
}
.fl-view button { -webkit-user-select: none; user-select: none; }

/* header, floating over the map */
.fl-top {
  position: fixed; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 8px) 12px 14px; pointer-events: none;
  background: linear-gradient(rgba(7,11,21,.92), rgba(7,11,21,.55) 60%, rgba(7,11,21,0));
  transition: background .2s ease;
}
.fl-top > * { pointer-events: auto; }
.fl-top.solid { background: rgba(10,15,29,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 #1a2338; padding-bottom: 8px; }
.fl-title { flex: 1; min-width: 0; text-align: center; }
.fl-title h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.fl-title .sub { display: block; font-size: 12px; font-weight: 600; color: var(--fl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-cbtn {
  width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; padding: 9px; display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.fl-cbtn svg { width: 100%; height: 100%; }
.fl-cbtn.ghost { visibility: hidden; }
.fl-cbtn:active, .fl-pill:active, .fl-item:active, .fl-chip:active { transform: scale(.97); }

/* the map */
.fl-hero { position: sticky; top: 0; height: min(58vh, 560px); min-height: 300px; z-index: 0; background: var(--fl-sea); }
.fl-map { position: absolute; inset: 0; }
.wm-canvas { display: block; width: 100%; height: 100%; }
.fl-mapbar { position: absolute; left: 10px; right: 10px; bottom: 30px; z-index: 2; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.fl-mapbar > * { pointer-events: auto; }
.fl-legend:empty { display: none; }
.fl-legend, .fl-pill {
  display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; color: #dfe7f9;
  background: rgba(8,12,24,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 11.5px; font-weight: 700; padding: 6px 10px; white-space: nowrap;
}
.fl-legend { max-width: 60%; overflow: hidden; }
.fl-grad { display: inline-block; width: 60px; height: 6px; border-radius: 3px; }
.fl-key { display: inline-flex; align-items: center; gap: 4px; }
.fl-key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fl-gap { flex: 1; }
.fl-fit { width: 32px; height: 32px; padding: 7px; justify-content: center; }
.fl-fit svg { width: 100%; height: 100%; }

/* the journey you tapped on the map */
.fl-card {
  position: absolute; left: 10px; right: 10px; bottom: 72px; z-index: 3; display: flex; align-items: stretch;
  background: rgba(15,22,40,.94); border: 1px solid #263252; border-radius: 16px; overflow: hidden;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: fade .15s ease;
  box-shadow: 0 8px 26px rgba(0,0,0,.45);
}
.fl-card-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; text-align: left; padding: 10px 6px 10px 10px; }
.fl-card-x { width: 44px; border: 0; background: none; color: var(--fl-muted); padding: 13px; flex: none; }
.fl-card-x svg { width: 100%; height: 100%; }
.fl-chev { width: 22px; height: 22px; transform: rotate(-90deg); color: var(--fl-muted); flex: none; }
.fl-chev svg { width: 100%; height: 100%; }

/* the sheet that slides up over the map */
.fl-body {
  position: relative; z-index: 1; margin-top: -20px; min-height: 64vh; background: var(--fl-body);
  border-radius: 22px 22px 0 0; padding: 6px 14px calc(var(--safe-b) + 40px); box-shadow: 0 -10px 30px rgba(0,0,0,.45);
}
.fl-grab { width: 38px; height: 5px; border-radius: 3px; background: #26304a; margin: 4px auto 12px; }
.fl-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 12px; }
.fl-chips::-webkit-scrollbar { display: none; }
.fl-chip { flex: none; border: 0; border-radius: 999px; background: var(--fl-card2); color: #dfe7f9; font-size: 14px; font-weight: 700; padding: 8px 14px; white-space: nowrap; }
.fl-chip span { margin-left: 5px; opacity: .55; font-weight: 600; }
.fl-chip[aria-selected="true"] { background: var(--fl-gold); color: #141414; }
.fl-chip.fl-focus span { opacity: .8; font-size: 15px; }
.fl-status { margin: 0 2px 10px; font-size: 13px; color: var(--fl-gold); font-weight: 600; }
.fl-status:empty { display: none; }

/* passport */
.fl-pass { background: linear-gradient(160deg, #16223f 0%, #0f1729 70%); border: 1px solid #1f2b47; border-radius: 20px; padding: 14px 14px 12px; margin: 2px 0 18px; }
.fl-pass:empty { display: none; }
.fl-pass-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--fl-muted); margin: 0 0 12px; }
.fl-stamp { color: var(--fl-gold); border: 1.5px solid rgba(255,216,77,.55); border-radius: 6px; padding: 2px 7px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; transform: rotate(-2deg); }
.fl-bigs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fl-big { min-width: 0; }
.fl-big b { display: block; font-size: clamp(20px, 6.6vw, 30px); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fl-big span { display: block; font-size: 12px; font-weight: 600; color: #9fb0cf; margin-top: 2px; }
.fl-big small { display: block; font-size: 11px; color: #6f7d99; }
.fl-fun { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 2px; padding: 10px 0 0; border-top: 1px solid #1f2b47; font-size: 13px; color: var(--fl-soft); }
.fl-fun b { color: var(--fl-gold); font-weight: 800; }
.fl-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; }
.fl-tile { background: rgba(255,255,255,.04); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.fl-tile b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fl-tile span { display: block; font-size: 11.5px; color: #9fb0cf; font-weight: 600; }
.fl-facts { margin: 12px 0 0; border-top: 1px solid #1f2b47; }
.fl-fact { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; border: 0; border-bottom: 1px solid #1a2540; background: none; color: inherit; padding: 9px 0; text-align: left; font-size: 14px; }
.fl-fact:last-child { border-bottom: 0; }
.fl-fact .k { color: var(--fl-muted); font-size: 13px; flex: none; }
.fl-fact .v { text-align: right; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.fl-fact .v small { display: block; font-weight: 600; font-size: 11.5px; color: #7f8daa; }
.fl-h3 { font-size: 13px; font-weight: 800; color: var(--fl-muted); text-transform: uppercase; letter-spacing: .07em; margin: 18px 2px 8px; }
.fl-pass .fl-h3 { margin: 16px 0 8px; }
.fl-routes { display: grid; gap: 6px; }
.fl-route { display: flex; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.fl-route span { color: var(--fl-muted); font-size: 12.5px; white-space: nowrap; }
.fl-bars { display: flex; align-items: flex-end; gap: 4px; height: 118px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.fl-bars::-webkit-scrollbar { display: none; }
.fl-bar { flex: 1 0 20px; min-width: 20px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border: 0; background: none; color: inherit; padding: 0; }
.fl-bar-n { font-size: 10.5px; font-weight: 700; color: var(--fl-soft); min-height: 14px; }
.fl-bar-col { width: 100%; max-width: 26px; height: 76px; display: flex; flex-direction: column-reverse; gap: 2px; }
.fl-bar-col i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; min-height: 0; }
.fl-bar-other { background: #2b3758; }
.fl-bar-y { font-size: 10.5px; color: var(--fl-muted); margin-top: 4px; font-weight: 600; }

/* the journeys */
.fl-year { display: flex; align-items: baseline; gap: 8px; margin: 18px 2px 8px; }
.fl-year b { font-size: 17px; font-weight: 800; }
.fl-year span { font-size: 12.5px; font-weight: 600; color: var(--fl-muted); }
.fl-item {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 8px; padding: 12px; border: 0; border-radius: 16px;
  background: var(--fl-card); color: inherit; text-align: left;
}
.fl-item.on { box-shadow: inset 0 0 0 2px var(--fl-gold); }
.fl-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; padding: 8px; display: grid; place-items: center; background: #172544; color: var(--fl-blue); }
.fl-ico svg { width: 100%; height: 100%; }
.fl-ico.m-train { background: #142f27; color: #6fe39a; }
.fl-ico.m-ground, .fl-ico.m-car, .fl-ico.m-drive { background: #33281a; color: #ffb454; }
.fl-ico.m-bus { background: #33202c; color: #f59ac6; }
.fl-ico.m-boat { background: #11323a; color: #4fe3e3; }
.fl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fl-codes { font-size: 17px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-codes i { font-style: normal; color: #64728f; margin: 0 6px; font-weight: 600; }
.fl-cities { font-size: 13px; color: var(--fl-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-meta { font-size: 12px; color: #7f8daa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: 34%; }
.fl-side b { font-size: 13px; white-space: nowrap; }
.fl-srcs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.fl-src { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: #1c2742; color: #9fb0cf; white-space: nowrap; }
.fl-src.s-memories { background: #163026; color: #7fe0a8; }
.fl-src.s-calendar { background: #142d4b; color: #7cc4ff; }
.fl-src.s-pasted { background: #33281a; color: #ffc46b; }
.fl-src.s-manual { background: #281f3f; color: #c5a8ff; }
.fl-more { display: block; margin: 12px auto; background: var(--fl-card2); color: var(--fl-ink); }
.fl-foot { margin: 22px 4px 0; text-align: center; }
.fl-foot p { font-size: 12px; color: #6f7d99; margin: 10px 0 0; line-height: 1.5; }
.fl-link { border: 0; background: none; color: var(--fl-gold); font-weight: 700; font-size: 14px; padding: 6px 4px; }

.fl-empty { text-align: center; padding: 26px 8px 8px; }
.fl-empty-icon { width: 54px; height: 54px; margin: 0 auto 12px; color: var(--fl-gold); transform: rotate(45deg); }
.fl-empty-icon svg { width: 100%; height: 100%; }
.fl-empty h2 { font-size: 21px; margin: 0 0 8px; }
.fl-empty p { color: var(--fl-soft); font-size: 14px; margin: 0 auto 16px; max-width: 340px; }
.fl-empty .btn { max-width: 340px; margin: 0 auto 8px; display: block; }
.fl-view .btn.secondary, .fl-sheet .btn.secondary { background: var(--fl-card2, #1a2440); color: var(--fl-ink, #eef3ff); }

/* one journey */
.fl-detail { position: fixed; inset: 0; z-index: 6; display: flex; flex-direction: column; background: var(--fl-body); animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.fl-d-top { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 8px) 12px 8px; }
.fl-d-top h2 { flex: 1; margin: 0; text-align: center; font-size: 18px; font-weight: 800; }
.fl-d-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.fl-mini { position: relative; height: 210px; margin: 4px 12px 0; border-radius: 18px; overflow: hidden; background: var(--fl-sea); }
.fl-d-body { padding: 16px 16px calc(var(--safe-b) + 30px); }
.fl-leg-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--fl-muted); }
.fl-leg { background: var(--fl-card); border-radius: 18px; padding: 14px; margin: 0 0 10px; }
.fl-ends { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: start; }
.fl-end { min-width: 0; }
.fl-end.to { text-align: right; }
.fl-end b { display: block; font-size: clamp(22px, 8vw, 32px); font-weight: 800; letter-spacing: .01em; line-height: 1.05; overflow-wrap: anywhere; }
.fl-end span { display: block; font-size: 13px; color: var(--fl-soft); margin-top: 2px; overflow-wrap: anywhere; }
.fl-end em { display: block; font-style: normal; font-size: 18px; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.fl-end small { display: block; font-size: 12px; color: var(--fl-muted); }
.fl-path { display: flex; align-items: center; gap: 3px; padding-top: 12px; color: var(--fl-blue); }
.fl-path.m-train { color: #6fe39a; } .fl-path.m-ground, .fl-path.m-car, .fl-path.m-drive { color: #ffb454; } .fl-path.m-boat { color: #4fe3e3; } .fl-path.m-bus { color: #f59ac6; }
.fl-path i { display: block; width: 14px; height: 2px; border-radius: 1px; background: currentColor; opacity: .5; }
.fl-path span { display: block; width: 22px; height: 22px; }
.fl-path span svg { width: 100%; height: 100%; }
.fl-path.m-plane span svg { transform: rotate(90deg); }
.fl-note { font-size: 12.5px; color: var(--fl-muted); margin: 10px 0 0; line-height: 1.45; }
.fl-dfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 12px 0 0; }
.fl-dfacts div { background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.fl-dfacts span { display: block; font-size: 11.5px; color: var(--fl-muted); font-weight: 600; }
.fl-dfacts b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.fl-found { font-size: 12.5px; color: var(--fl-muted); margin: 4px 2px 0; }
.fl-hidden-note { background: #33281a; color: #ffc46b; border-radius: 12px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.fl-mems { margin: 18px 0 0; }
.fl-mems h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 2px 8px; font-size: 15px; }
.fl-mems h4 span { font-size: 12px; color: var(--fl-muted); font-weight: 600; flex: none; }
.fl-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.fl-strip::-webkit-scrollbar { display: none; }
.fl-mem { position: relative; flex: none; width: 76px; height: 102px; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--fl-card2); color: #fff; }
.fl-mem img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fl-mem img:not([src]) { visibility: hidden; }
.fl-mem.more { font-weight: 800; font-size: 15px; }
.fl-mem-v { position: absolute; left: 6px; bottom: 6px; width: 14px; height: 14px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.fl-mem-v svg { width: 100%; height: 100%; }
.fl-d-actions { display: grid; gap: 8px; margin: 22px 0 0; }
.fl-d-actions .btn + .btn { margin-top: 0; }

/* sheets opened from here are dark too */
.sheet.fl-sheet {
  --bg: #10172a; --fg: #eef3ff; --chip: #1a2440; --line: #26304a; --muted: #93a0bb;
  --fl-card2: #1a2440; --fl-ink: #eef3ff; --fl-muted: #93a0bb; --fl-soft: #b7c3dc; color-scheme: dark;
}
.fl-sheet .field input, .fl-sheet .field select, .fl-sheet textarea { background: #0c1324; border-color: #26304a; color: #eef3ff; }
.fl-sheet textarea { width: 100%; border-radius: 13px; border: 1.5px solid #26304a; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; }
.fl-sheet .field textarea { display: block; }
.fl-menu { display: grid; gap: 8px; margin: 10px 0 4px; }
.fl-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 16px; background: var(--chip); color: var(--fg); padding: 12px 14px; text-align: left; }
.fl-menu-item b { display: block; font-size: 15.5px; }
.fl-menu-item small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.fl-menu-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; background: #24305a; color: #ffd84d; padding: 9px; display: grid; place-items: center; }
.fl-menu-ico svg { width: 100%; height: 100%; }
.fl-paste { min-height: 160px; margin: 0 0 12px; }
.fl-preview { display: grid; gap: 8px; margin: 0 0 12px; }
.fl-pv { display: flex; align-items: center; gap: 10px; background: var(--chip); border-radius: 14px; padding: 10px 12px; }
.fl-pv input { width: 20px; height: 20px; accent-color: #ffd84d; flex: none; }
.fl-pv .fl-ico { width: 32px; height: 32px; padding: 7px; border-radius: 10px; }
.fl-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fl-row2 .field { min-width: 0; }
.fl-place { position: relative; }
.fl-sugg { display: grid; gap: 4px; margin-top: 4px; }
.fl-sugg:empty { display: none; }
.fl-sugg-item { display: flex; align-items: baseline; gap: 10px; width: 100%; border: 0; border-radius: 10px; background: #1a2440; color: #eef3ff; padding: 9px 12px; text-align: left; font-size: 14px; }
.fl-sugg-item b { flex: none; min-width: 34px; color: #ffd84d; }
.fl-sugg-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-hidden { display: grid; gap: 8px; margin: 8px 0 0; }
.fl-hrow { display: flex; align-items: center; gap: 10px; background: var(--chip); border-radius: 14px; padding: 10px 12px; }
.fl-hrow .fl-ico { width: 32px; height: 32px; padding: 7px; border-radius: 10px; }
.fl-hrow .tab { flex: none; background: #24305a; color: #eef3ff; }

/* the card for the Storybook and Trips screens */
.fl-row { padding: 6px 14px 8px; }
.fl-row-card { position: relative; display: block; width: 100%; height: 150px; border: 0; padding: 0; border-radius: 18px; overflow: hidden; background: #070b15; color: #fff; text-align: left; }
.fl-row-map { position: absolute; inset: 0; pointer-events: none; }
.fl-row-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 48px 12px 14px; background: linear-gradient(rgba(7,11,21,0), rgba(7,11,21,.85)); }
.fl-row-txt b { display: block; font-size: 17px; font-weight: 800; }
.fl-row-txt span { display: block; font-size: 12.5px; color: #b7c3dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-row-go { position: absolute; right: 12px; bottom: 14px; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: rgba(255,255,255,.14); transform: rotate(-90deg); }
.fl-row-go svg { width: 100%; height: 100%; }

@media (min-width: 700px) {
  .fl-body { max-width: 640px; margin-left: auto; margin-right: auto; }
  .fl-card { left: 50%; right: auto; width: 420px; transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .fl-view, .fl-detail, .fl-card { animation: none; }
}
