/* trips-page.css — the /trips page (trips/index.html, js/trips/page.js). The trip cards,
   timeline, review dialog and calendar share trips.css with the map. */

/* A normal scrolling page under the fixed top bar */
html:has(body.trips-body), body.trips-body { height: auto; min-height: 100%; }
body.trips-body { padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }
body.trips-body a { color: var(--accent); }

/* Top bar: the section tabs are links here */
.topbar a.tb-brand { color: var(--text); text-decoration: none; }
.topbar .mode-tabs a {
  display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; border-radius: 9px;
  font-size: 13.5px; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.topbar .mode-tabs a:hover { color: var(--text); }
.topbar .mode-tabs a[aria-current="page"] { background: var(--accent); color: var(--night); font-weight: 700; }

/* Link styled as a button */
a.btn {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none;
  color: var(--night) !important; background: var(--accent); border-radius: 8px; padding: 8px 12px;
}
a.btn.ghost { background: transparent; color: var(--text) !important; border: 1px solid var(--edge); font-weight: 400; }
a.btn:hover { filter: brightness(1.08); }

/* ---------- Layout: list · trip · map and updates ---------- */
.trips-page { box-sizing: border-box; max-width: 1480px; margin: 0 auto; padding: 20px 20px 48px; }
.tp-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.tp-grid[hidden] { display: none; }
.tp-list, .tp-side { position: sticky; top: calc(var(--topbar-h) + 20px); max-height: calc(100dvh - var(--topbar-h) - 40px); overflow-y: auto; }
.tp-list { padding-right: 4px; }
.tp-list .trips-head h1 { margin: 0; font-size: 22px; }
.tp-main { min-width: 0; padding: 18px 22px 24px; border: 1px solid var(--edge); border-radius: 16px; background: rgba(255, 255, 255, 0.025); min-height: 60vh; }
.tp-side { display: flex; flex-direction: column; gap: 14px; }
/* a photo picked (computers): "Where it was taken" first, then the photo's caption and details */
@media (min-width: 901px) { .tp-side.sel-p .tp-strip { order: -4; } .tp-side.sel-p .tp-side-head { order: -3; } .tp-side.sel-p #tp-map-card { order: -2; } .tp-side.sel-p #tp-sel { order: -1; } }
.tp-card { padding: 12px 14px; border: 1px solid var(--edge); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.tp-card[hidden] { display: none; }
.tp-card .trips-sub { margin-top: 0; }
.tp-map-card { padding: 0; overflow: hidden; }
.tp-map { height: 380px; background: var(--night); }
.tp-note { margin: 0 4px; line-height: 1.5; }
.trips-page .trip-detail h2#trip-title { font-size: 26px; }
.trips-page .leg { background: rgba(255, 255, 255, 0.035); }
.tp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 40vh; }
.tp-empty h2 { margin: 0 0 6px; }
.tp-empty p { max-width: 420px; line-height: 1.5; }

/* Trip cards are links on this page */
a.trip-card { box-sizing: border-box; text-decoration: none; color: var(--text) !important; }
.trip-card.current { border-color: var(--accent); background: rgba(124, 199, 255, 0.08); }
.trip-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.trip-chip.bf { background: rgba(255, 176, 92, 0.18); color: #FFC27A; }

/* While a file is dragged over the page */
body.dragging .trip-drop { border-color: var(--accent); background: rgba(124, 199, 255, 0.1); }

/* Signed out */
.tp-signedout { max-width: 520px; margin: 12vh auto 0; text-align: center; }
.tp-signedout[hidden] { display: none; }
.tp-signedout h1 { margin: 0 0 8px; }
.tp-signedout p { color: var(--muted); line-height: 1.55; margin: 0 0 16px; }

/* ---------- Before you go: immigration / entry forms ---------- */
.before-go {
  margin: 16px 0 6px; padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 170, 80, 0.16), rgba(255, 170, 80, 0.06));
  border: 1px solid rgba(255, 176, 92, 0.6); box-shadow: 0 0 0 3px rgba(255, 176, 92, 0.08);
}
.before-go.all-done { background: rgba(127, 224, 181, 0.07); border-color: rgba(127, 224, 181, 0.45); box-shadow: none; }
.bf-top { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.bf-top::-webkit-details-marker { display: none; }
.bf-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bf-h { font-size: 16px; font-weight: 700; }
.bf-line { color: var(--muted); }
.bf-line b { color: var(--text); }
.bf-chev { flex: none; width: 22px; height: 22px; fill: var(--muted); transition: transform 0.15s; }
.before-go[open] .bf-chev { transform: rotate(180deg); }
.bf-note { margin: 10px 0 0; }
.bf-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: #FFB05C; display: flex; align-items: center; justify-content: center; }
.bf-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--night); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.all-done .bf-icon { background: var(--good); }
.bf-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.bf-card { display: block; padding: 10px 14px; border-radius: 12px; background: rgba(12, 22, 38, 0.75); border: 1px solid var(--edge); }
.bf-card[data-soon] { border-color: #FFB05C; }
.bf-card[data-status="done"], .bf-card[data-status="ignored"] { opacity: 0.75; }
.bf-head { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.bf-head::-webkit-details-marker { display: none; }
.bf-name { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.small-chev { width: 18px !important; height: 18px !important; }
.bf-card[open] .small-chev { transform: rotate(180deg); }
.bf-card > :not(summary) { margin-top: 8px; }
.bf-flag { flex: none; width: 34px; height: 26px; border-radius: 6px; background: rgba(150, 175, 210, 0.2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; letter-spacing: 0.04em; }
.bf-soon { color: #FFC27A; font-weight: 700; }
.bf-text { margin: 0; font-size: 13px; line-height: 1.5; }
.bf-url { margin: 0; word-break: break-all; }
.bf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bf-acts button, .bf-acts a.btn { padding: 7px 12px; font-size: 12.5px; }
.bf-acts .linkish { font-size: 12.5px; }

/* ---------- Tablets: map and updates move under the trip ---------- */
@media (max-width: 1240px) {
  .tp-grid { grid-template-columns: 300px minmax(0, 1fr); }
  .tp-side { grid-column: 2; position: static; max-height: none; overflow: visible; }
  .tp-map { height: 300px; }
}

/* ---------- Phones: one column, the list or the open trip ---------- */
@media (max-width: 900px) {
  .trips-page { padding: 12px 12px 40px; }
  .tp-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tp-list, .tp-side { position: static; max-height: none; overflow: visible; grid-column: auto; }
  .tp-main { padding: 14px 14px 18px; min-height: 0; border-radius: 14px; }
  body.trips-body:not(.tp-open) .tp-main, body.trips-body:not(.tp-open) .tp-side { display: none; }
  body.trips-body.tp-open .tp-list { display: none; }
  .tp-map { height: 240px; }
  .trips-page .trip-detail h2#trip-title { font-size: 21px; }
  .bf-list { grid-template-columns: minmax(0, 1fr); }
  .topbar .mode-tabs a { flex: 1; min-height: 38px; padding: 6px 4px; font-size: 12.5px; }
}
@media (min-width: 901px) { .trips-page .trip-back { display: none; } }
.leg-acts a.btn { padding: 5px 10px; font-size: 12px; }

/* ---------- Airline logos on the timeline ---------- */
.trips-page .leg-badge.leg-logo { width: 76px; height: 30px; padding: 3px 5px; box-sizing: border-box; background: #fff; border-radius: 7px; }
.trips-page .leg-badge.leg-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---------- Along the way ---------- */
.aw { margin-top: 6px; border-top: 1px solid var(--edge); padding-top: 6px; }
.aw > summary { display: flex; align-items: baseline; gap: 6px; cursor: pointer; font-size: 13px; color: var(--accent); }
.aw-h { font-weight: 700; }
.aw-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.aw-list li { display: grid; grid-template-columns: 74px 22px minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 5px 8px; border-radius: 8px; font-size: 13px; }
.aw-list li.mine { background: rgba(196, 167, 255, 0.08); }
.aw-list li.other { opacity: 0.62; }
.aw-list li.passed { opacity: 0.4; }
.aw-list li.next { background: rgba(196, 167, 255, 0.2); outline: 1px solid rgba(196, 167, 255, 0.6); opacity: 1; }
.aw-t { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.aw-side { display: inline-flex; justify-content: center; width: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; background: rgba(150, 175, 210, 0.2); }
.aw-side[data-side="left"] { color: #C4A7FF; }
.aw-side[data-side="right"] { color: #7FE0B5; }
.aw-name { display: flex; flex-direction: column; min-width: 0; }
.aw-name a { color: var(--text) !important; font-weight: 700; text-decoration: none; }
.aw-name a:hover { text-decoration: underline; }
.aw-note { margin: 8px 0 0; }

/* ---------- Right column: route map / live mini map ---------- */
.tp-map-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--edge); font-size: 13px; }
.tp-map-title { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-map[hidden], .tp-live[hidden] { display: none; }
.tp-live iframe { display: block; width: 100%; height: 460px; border: 0; background: var(--night); }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #FF6B6B; box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.6); animation: live-pulse 1.6s infinite; vertical-align: 1px; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 107, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); } }
.tp-map-card.tp-full { position: fixed; inset: 0; z-index: 2000; border-radius: 0; display: flex; flex-direction: column; }
.tp-map-card.tp-full .tp-live { flex: 1; }
.tp-map-card.tp-full .tp-live iframe { height: 100%; }
body.tp-full-open { overflow: hidden; }
@media (max-width: 900px) {
  .tp-side.live { order: -1; }          /* phones: the live mini map comes first while you fly */
  .tp-live iframe { height: 400px; }
  .trips-page .leg-badge.leg-logo { width: 60px; height: 26px; }
  .aw-list li { grid-template-columns: 62px 20px minmax(0, 1fr); }
}

/* ---------- Left column: + Trip, Past · Current · Upcoming ---------- */
.trips-head #trip-add-btn { padding: 7px 14px; font-size: 13px; border-radius: 18px; }
.trip-add[hidden] { display: none; }
.trip-add { margin-bottom: 10px; animation: tp-drop-in 0.18s ease-out; }
@keyframes tp-drop-in { from { opacity: 0; transform: translateY(-6px); } }
.tp-listtabs { display: flex; gap: 2px; margin: 14px 0 10px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--edge); }
.tp-listtabs button { flex: 1; padding: 6px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: transparent; color: var(--muted); border-radius: 7px; }
.tp-listtabs button[aria-selected="true"] { background: var(--accent); color: var(--night); }
.tp-listtabs .n { font-weight: 400; opacity: 0.8; }
.tp-listtabs .n:empty { display: none; }
.tp-listtabs button.live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #FF6B6B; vertical-align: 2px; }

/* ---------- Trip tabs ---------- */
.trip-title-row { flex-wrap: wrap; }
.trip-title-row h2 { flex: 1; min-width: 200px; }
.tp-tabbar { position: sticky; top: var(--topbar-h); z-index: 5; margin: 16px -4px 0; background: #0E1A2C; }
.tp-tabs { display: flex; justify-content: flex-start; gap: 4px; padding: 0 4px; border-bottom: 1px solid var(--edge); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tp-tabs::-webkit-scrollbar { display: none; }
/* ‹ › when some tabs don't fit (js: scrollArrows) */
.sx-wrap { position: relative; }
.sx-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 32px; height: 32px; padding: 0; border-radius: 16px; border: 1px solid var(--edge);
  background: var(--pop-bg, #101C30); color: var(--text); font-size: 20px; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); cursor: pointer; display: grid; place-items: center; }
.sx-btn[hidden] { display: none; }
.sx-l { left: 0; } .sx-r { right: 0; }
.sx-wrap::before, .sx-wrap::after { content: ''; position: absolute; top: 0; bottom: 1px; width: 56px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.sx-wrap::before { left: 0; background: linear-gradient(90deg, #0E1A2C 40%, transparent); }
.sx-wrap::after { right: 0; background: linear-gradient(270deg, #0E1A2C 40%, transparent); }
.sx-wrap.sx-fl::before, .sx-wrap.sx-fr::after { opacity: 1; }
.tp-tabs button { flex: none; padding: 10px 14px; font-size: 13.5px; font-weight: 400; background: transparent; color: var(--muted); border-radius: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.tp-tabs button[aria-selected="true"] { color: var(--text); font-weight: 700; border-bottom-color: var(--accent); }
.tp-tabs button[data-here]:not([aria-selected="true"]) { color: var(--text); border-bottom-color: rgba(124, 199, 255, 0.35); }
.tp-tabs button .n { display: inline-flex; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; justify-content: center; align-items: center; background: rgba(150, 175, 210, 0.2); font-size: 10.5px; color: var(--text); }
.tp-panel { padding-top: 6px; }
.tp-panel .trip-acts { margin-top: 12px; }
.small-empty { min-height: 26vh; }
.small-empty h2 { font-size: 18px; }

/* ---------- Stay card in the itinerary ---------- */
.trip-stay.with-card { gap: 8px; color: var(--muted); }
.stay-card { align-self: stretch; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 176, 92, 0.12), rgba(255, 176, 92, 0.04)); border: 1px solid rgba(255, 176, 92, 0.45); color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.stay-top { display: flex; align-items: center; gap: 10px; }
.stay-ic { font-size: 24px; }
.stay-name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stay-name b { font-size: 14.5px; }
.stay-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.stay-facts a { color: var(--accent); text-decoration: none; }
.stay-warn { padding: 8px 10px; border-radius: 9px; background: rgba(242, 193, 78, 0.12); border: 1px solid rgba(242, 193, 78, 0.45); color: #F7D57A; font-size: 13px; line-height: 1.45; }

/* ---------- Lodging tab ---------- */
.lodging { margin: 14px 0 26px; }
.lg-hero { position: relative; padding: 22px 22px 18px; border-radius: 16px; background: linear-gradient(135deg, #18304F, #0F1E33); border: 1px solid var(--edge); background-size: cover; background-position: center; display: flex; flex-direction: column; gap: 6px; }
.lg-hero.has-photo { min-height: 230px; justify-content: flex-end; }
.lg-kind { align-self: flex-start; padding: 3px 10px; border-radius: 12px; background: rgba(12, 22, 38, 0.7); font-size: 12px; text-transform: capitalize; }
.lg-hero h2 { margin: 4px 0 0; font-size: 26px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.lg-unit { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 8px; background: var(--accent); color: var(--night); font-size: 14px; vertical-align: 4px; }
.lg-hero p { margin: 0; color: #C9D4E4; }
.lg-dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: rgba(12, 22, 38, 0.72); }
.lg-dates span { display: flex; flex-direction: column; }
.lg-dates span:last-child { text-align: right; }
.lg-dates small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.lg-dates b { font-size: 14px; }
.lg-n { align-items: center; padding: 3px 10px; border-radius: 12px; background: rgba(124, 199, 255, 0.18); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.lg-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 13px; }
.lg-links a { color: var(--accent); text-decoration: none; }
.lodging > .stay-warn { margin-top: 12px; }
.lg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.lg-sec { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--edge); }
.lg-sec h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; letter-spacing: 0.02em; }
.lg-sec h3 span { font-size: 18px; }
.lg-p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.5; }
.lg-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.lg-list.tips { color: var(--muted); }
.lg-steps { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 7px; }
.lg-steps li { counter-increment: s; display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: 13px; line-height: 1.45; }
.lg-steps li::before { content: counter(s); display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(124, 199, 255, 0.18); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.lg-ride, .lg-extra { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; font-size: 13px; line-height: 1.45; }
.lg-ride > span:first-child, .lg-extra > span:first-child { font-size: 20px; }
.lg-code { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: rgba(12, 22, 38, 0.8); border: 1px dashed var(--edge); font-size: 13px; }
.lg-code span { flex: 1; }
.lg-code b { font-size: 18px; letter-spacing: 0.12em; }
.lg-hk { font-size: 13px; margin-bottom: 6px; }
.lg-contact { display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--edge); }
.lg-contact:last-of-type { border-bottom: 0; }
.lg-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2E5B8A, #1C3A5C); font-weight: 700; }
.lg-who { display: flex; flex-direction: column; min-width: 0; }
.lg-cacts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.lg-cacts a.btn { padding: 5px 10px; font-size: 12px; }
a.btn.wa { background: #25D366; color: #0B2A17 !important; }
a.btn.wa svg { width: 15px; height: 15px; fill: currentColor; }
.lg-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lg-check li::before { content: '☐ '; color: var(--accent); }
.lg-foot { margin-top: 10px; }
.bf-hints { margin-top: 8px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 176, 92, 0.08); border: 1px solid rgba(255, 176, 92, 0.3); }
.bf-hints ul { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5; }

/* ---------- Travel Info ---------- */
.ti-place, .td-place { margin: 14px 0 22px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--edge); }
.ti-place.layover { padding: 12px 16px; }
.ti-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; margin-bottom: 10px; }
.ti-head h3 { margin: 0; font-size: 19px; }
.ti-head .dim { font-weight: 400; }
.ti-wx { display: flex; flex-direction: column; gap: 10px; }
.ti-wx.loading { flex-direction: row; align-items: center; color: var(--muted); }
.ti-now { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 12px 16px; }
.ti-temp { display: flex; flex-direction: column; }
.ti-temp b { font-size: 30px; line-height: 1.1; }
.ti-sum { margin: 0; font-size: 13.5px; line-height: 1.45; color: #D7E2F0; }
.ti-days { display: grid; grid-template-columns: repeat(10, minmax(54px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.ti-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); font-size: 12px; }
.ti-day.mine { background: rgba(124, 199, 255, 0.13); outline: 1px solid rgba(124, 199, 255, 0.45); }
.ti-dow { color: var(--muted); font-size: 11px; }
.ti-hi { font-weight: 700; }
.ti-lo { color: var(--muted); font-size: 11px; }
.ti-rain { font-size: 10.5px; color: var(--muted); }
.ti-rain.wet { color: #7CC7FF; }
.ti-alerts { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ti-row { font-size: 13px; }
.ti-row.ok { color: var(--good); }
.ti-alert { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; background: rgba(242, 193, 78, 0.1); border: 1px solid rgba(242, 193, 78, 0.45); }
.ti-alert.bad { background: rgba(255, 138, 148, 0.1); border-color: rgba(255, 138, 148, 0.5); }
.ti-adv { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--edge); font-size: 13px; }
.ti-adv summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; cursor: pointer; }
.ti-lvl { padding: 2px 9px; border-radius: 10px; font-weight: 700; font-size: 12px; background: rgba(150, 175, 210, 0.2); }
.ti-adv.good .ti-lvl { background: rgba(127, 224, 181, 0.18); color: var(--good); }
.ti-adv.warn .ti-lvl { background: rgba(242, 193, 78, 0.18); color: var(--warn); }
.ti-adv.bad .ti-lvl { background: rgba(255, 138, 148, 0.18); color: var(--bad); }
.ti-adv p { margin: 8px 0 4px; line-height: 1.5; color: #D7E2F0; }
.ti-brief { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--edge); }
.ti-lead { margin: 0 0 8px; font-size: 14px; line-height: 1.55; }
.ti-brief h4 { margin: 14px 0 6px; font-size: 13px; }
.ti-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ti-list li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; font-size: 13px; line-height: 1.5; }
.ti-list li.warning { color: #FFC3C8; }
.ti-src { margin-top: 12px; }
.ti-src a, .ti-brief a, .ti-alert a, .ti-adv a { color: var(--accent); }

/* ---------- Things to Do ---------- */
.td-add { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.td-add .search-row { display: flex; gap: 6px; max-width: 520px; }
.td-add .search-row input { flex: 1; }
.td-results { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.td-pick { display: flex; flex-direction: column; align-items: flex-start; padding: 6px 12px; background: rgba(124, 199, 255, 0.1); color: var(--text); border: 1px solid rgba(124, 199, 255, 0.4); font-weight: 400; }
.td-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.td-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.td-card { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px; border-radius: 14px; background: rgba(12, 22, 38, 0.6); border: 1px solid var(--edge); transition: border-color 0.15s; }
.td-card:hover { border-color: rgba(124, 199, 255, 0.5); }
.td-card.saved { border-color: rgba(242, 193, 78, 0.6); background: rgba(242, 193, 78, 0.06); }
.td-card.hidden-item { opacity: 0.5; }
.td-top { display: flex; align-items: flex-start; gap: 8px; }
.td-ic { font-size: 22px; line-height: 1; }
.td-top h4 { flex: 1; margin: 0; font-size: 14.5px; line-height: 1.3; }
.td-top h4 a { color: var(--text) !important; text-decoration: none; }
.td-top h4 a:hover { color: var(--accent) !important; }
.td-star { color: var(--warn); }
.td-card p { margin: 0; font-size: 13px; line-height: 1.5; color: #D7E2F0; }
.td-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.td-book { color: #FFC27A; }
.td-day { color: var(--accent); }
.td-acts { display: flex; gap: 6px; margin-top: auto; }

/* ---------- Animated weather icons ---------- */
.wx-ic { flex: none; overflow: visible; }
.wx-sun circle { fill: #FFD25E; }
.wx-rays path { stroke: #FFD25E; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.wx-rays { transform-origin: 24px 24px; animation: wx-spin 18s linear infinite; }
.wx-moon { fill: #E6E2C8; }
.wx-cloud { fill: #DCE6F2; }
.wx-cloud.dark { fill: #8E9DB4; }
.wx-cloud2 { fill: #9FB0C8; opacity: 0.8; }
.wx-drift { animation: wx-drift 6s ease-in-out infinite alternate; }
.wx-drop { stroke: #6CB6FF; stroke-width: 2.4; stroke-linecap: round; animation: wx-fall 1.1s linear infinite; }
.wx-drop.small { stroke-width: 1.8; }
.wx-flake { fill: #fff; animation: wx-snow 2.4s linear infinite; }
.wx-bolt { fill: #FFD25E; animation: wx-flash 2.4s infinite; }
.wx-fog path { stroke: #B7C4D6; stroke-width: 2.6; stroke-linecap: round; animation: wx-drift 5s ease-in-out infinite alternate; }
@keyframes wx-spin { to { transform: rotate(360deg); } }
@keyframes wx-drift { from { transform: translateX(-1.5px); } to { transform: translateX(2.5px); } }
@keyframes wx-fall { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(6px); opacity: 0; } }
@keyframes wx-snow { 0% { transform: translateY(-4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(2px, 7px); opacity: 0; } }
@keyframes wx-flash { 0%, 62%, 70%, 100% { opacity: 0.25; } 64%, 68% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wx-ic * { animation: none !important; } }

/* Map credit: small, bottom-left, no "Leaflet" (OpenStreetMap's credit has to stay) */
.tp-map { position: relative; overflow: hidden; }
.tp-map .leaflet-control-attribution { font-size: 9.5px; background: rgba(12, 22, 38, 0.65) !important; color: var(--muted); padding: 0 5px; }
.tp-map .leaflet-control-attribution a { color: var(--muted); }

@media (max-width: 900px) {
  .tp-tabbar { top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); }
  .tp-tabs button { padding: 9px 10px; font-size: 12.5px; }
  .ti-now { grid-template-columns: auto 1fr; }
  .ti-sum { grid-column: 1 / -1; }
  .lg-hero h2 { font-size: 21px; }
  .lg-grid { grid-template-columns: minmax(0, 1fr); }
  .lg-dates { grid-template-columns: 1fr 1fr; }
  .lg-n { display: none !important; }
}

/* Map pins on the Things to Do / Lodging tabs */
.tp-pin span { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: #0F1E33; border: 2px solid var(--accent); font-size: 15px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.tp-pin.stay span { border-color: #FFB05C; background: #2A1E0E; font-size: 17px; }
.tp-pin.saved span { border-color: var(--warn); box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.35); }
.td-card.flash { animation: td-flash 1.6s ease-out; }
@keyframes td-flash { 0%, 40% { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 199, 255, 0.35); } }

/* ---------- Big hazards: a red banner on every tab ---------- */
.hazard-banner { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.32), rgba(220, 38, 38, 0.14)); border: 1px solid rgba(248, 113, 113, 0.7); color: #fee2e2; font-size: 14px; line-height: 1.45; }
.hazard-banner .hz-ic { font-size: 22px; line-height: 1; }
.hazard-banner b { display: block; color: #fff; font-size: 15px; margin-bottom: 2px; }
.hazard-banner a { color: #fecaca !important; font-weight: 700; margin-left: 6px; }

/* ---------- Lodging: add or edit a place to stay ---------- */
.lg-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0; }
.lg-found { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: rgba(124, 199, 255, 0.1); font-size: 13.5px; }
.stay-form { margin: 14px 0 22px; padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--accent); }
.stay-form h3 { margin: 0 0 12px; font-size: 18px; }
.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 8px 0; }
.sf-f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sf-f > span:first-child { color: var(--muted); }
.sf-f input, .sf-f textarea { width: 100%; box-sizing: border-box; }
.sf-f small.ok { color: #86efac; }
.sf-row { display: flex; gap: 6px; }
.sf-row input { flex: 1; }
.sf-wide { grid-column: 1 / -1; }
.sf-check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.sf-results { grid-column: 1 / -1; }
.sf-dates { margin: 14px 0; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.18); }
.sf-picked { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sf-pk { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 12px; border-radius: 10px; background: transparent; border: 1px solid var(--edge); color: var(--text); text-align: left; cursor: pointer; }
.sf-pk small { color: var(--muted); font-size: 11px; }
.sf-pk.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(124, 199, 255, 0.25); }
.rc { display: flex; align-items: flex-start; gap: 10px; }
.rc-nav { padding: 4px 10px; font-size: 18px; margin-top: 18px; }
.rc-m { flex: 1; min-width: 0; }
.rc-m > b { display: block; text-align: center; margin-bottom: 6px; font-size: 14px; }
.rc-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.rc-g i { font-style: normal; font-size: 11px; color: var(--muted); padding: 2px 0; }
.rc-d { padding: 7px 0; border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; position: relative; }
.rc-d:hover { background: rgba(255, 255, 255, 0.08); }
.rc-d.tr { background: rgba(124, 199, 255, 0.1); }
.rc-d.fl::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #fbbf24; }
.rc-d.mid { background: rgba(124, 199, 255, 0.32); border-radius: 0; }
.rc-d.in, .rc-d.out { background: var(--accent); color: var(--night); font-weight: 700; }
.rc-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; }
.rc-key .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.rc-key .k.tr { background: rgba(124, 199, 255, 0.3); }
.rc-key .k.fl { background: #fbbf24; border-radius: 50%; width: 8px; height: 8px; margin-left: 8px; }
.sf-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.sf-foot .tr-msg { margin-right: auto; font-size: 13px; color: #fcd34d; }
.td-stay-picks { margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; background: rgba(124, 199, 255, 0.07); }
.td-stay-picks h4 { margin: 0 0 6px; font-size: 14px; }
.td-stay-picks ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
@media (max-width: 700px) {
  .sf-grid { grid-template-columns: 1fr; }
  .rc .rc-m + .rc-m { display: none; } /* phones: one month at a time */
}
.sf-check input { width: auto; flex: none; }
.sf-check > span { color: var(--text) !important; }
/* Six tabs: tighter on mid-size screens so they fit without scrolling */
@media (min-width: 901px) and (max-width: 1500px) { .tp-tabs { gap: 0; } .tp-tabs button { padding: 10px 6px; font-size: 13px; } }

/* ---------- Sharing (js/trips/share.js) ---------- */
.trip-chip.shared { background: rgba(167, 139, 250, 0.18); color: #d8ccff; border-color: rgba(167, 139, 250, 0.5); }
/* Select trips to combine (Trips list) */
.tp-pick-start { align-self: flex-start; font-size: 12.5px; margin: 0 2px 2px; }
.tp-pickbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--accent); background: var(--panel, #101C30); }
html[data-theme="light"] .tp-pickbar { background: #fff; }
.tp-pickbar select { flex: 1 1 100%; }
.tp-pickbar-acts { display: flex; gap: 6px; }
a.pickable { position: relative; padding-left: 38px !important; }
a.pickable::before { content: ''; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -9px; border: 2px solid var(--muted); border-radius: 4px; }
a.pickable.picked { border-color: var(--accent); background: rgba(124, 199, 255, 0.1); }
a.pickable.picked::before { content: '✓'; border-color: var(--accent); background: var(--accent); color: #fff; font-size: 12px; line-height: 16px; text-align: center; font-weight: 700; }
/* Combine with another trip (panel under the trip name) */
.tp-combine { margin: 10px 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--accent); background: rgba(124, 199, 255, 0.06); display: flex; flex-direction: column; gap: 6px; }
.tp-combine p { margin: 0; }
.tp-combine-h { margin-top: 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tp-combine-any { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); max-width: 420px; }
.tp-combine-acts { display: flex; gap: 8px; margin-top: 4px; }
.leg-who { font-size: 12.5px; }
/* Past trips: one folding group per year, compact rows */
.tp-year { border-bottom: 1px solid var(--edge); }
.tp-year > summary { cursor: pointer; padding: 9px 4px; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 6px; }
.tp-year > summary::-webkit-details-marker { display: none; }
.tp-year > summary::before { content: '▸'; color: var(--muted); font-size: 11px; transition: transform 0.15s; }
.tp-year[open] > summary::before { transform: rotate(90deg); }
.tp-yrows { display: flex; flex-direction: column; gap: 4px; padding: 0 0 10px; }
a.trip-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; border: 1px solid transparent; text-decoration: none; color: var(--text) !important; }
a.trip-row:hover { border-color: var(--accent); }
a.trip-row.current { border-color: var(--accent); background: rgba(124, 199, 255, 0.08); }
.trip-row-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.trip-row-main b { font-size: 13.5px; }
.trip-row-main .dim, .trip-row-route { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-row-route { color: var(--muted); }
.trip-row-logos { display: flex; gap: 4px; flex: none; }
.trip-row-logos img { height: 16px; width: auto; max-width: 48px; border-radius: 3px; background: #fff; padding: 1px 2px; }
.tp-shared-h { margin: 18px 2px 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
/* View only: what only the owner can do is hidden (and ignored in page.js) */
.trip-detail.ro :is([data-act="rename"], [data-act="delete"], [data-act="leg-remove"], [data-act="seat"], [data-act="stay-add"], [data-act="stay-edit"],
  [data-act="stay-remove"], [data-act="place-remove"], [data-act="remove-stay"], [data-act="remove-flight"], [data-act="add-flight"], .lg-add, .td-add) { display: none !important; }
.hidden-code { color: var(--muted); }
.sh h2 { margin: 6px 0 4px; }
.sh-head { display: flex; align-items: flex-start; gap: 12px; }
.sh-head h2 { flex: 1; min-width: 0; }
.sh-x { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--edge); color: var(--text); text-decoration: none; font-size: 17px; line-height: 1; }
.sh-x:hover, .sh-x:focus-visible { background: rgba(255, 255, 255, 0.08); border-color: var(--accent); }
.sh-card { margin: 16px 0; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--edge); }
.sh-card h3 { margin: 0 0 10px; font-size: 16px; }
.sh-card h4 { margin: 16px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sh-err { color: var(--warn); font-size: 13.5px; margin: 8px 0 0; }
.sh-person { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(124, 199, 255, 0.08); }
.sh-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #a78bfa; color: var(--night); font-weight: 700; }
.sh-perms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.sh-perm { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge); cursor: pointer; }
.sh-perm input { margin-top: 3px; flex: none; }
.sh-perm b { display: block; font-size: 13.5px; }
.sh-perm small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.sh-perm.sensitive { border-color: rgba(242, 193, 78, 0.45); background: rgba(242, 193, 78, 0.05); }
.sh-perm:has(input:checked) { border-color: var(--accent); }
.sh-perm.sensitive:has(input:checked) { border-color: var(--warn); background: rgba(242, 193, 78, 0.14); }
.sh-preview { margin-top: 6px; }
.sh-prev { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.sh-prev li { display: flex; gap: 8px; padding: 3px 0; }
.sh-prev li.ok span { color: var(--good); }
.sh-prev li.no { color: var(--muted); }
.sh-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.sh-foot .tr-msg { margin-right: auto; color: var(--warn); font-size: 13px; }
.sh-row { padding: 10px 0; border-top: 1px solid var(--edge); }
.sh-row:first-of-type { border-top: 0; }
.sh-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sh-who { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-row .sh-perms { margin-top: 10px; }
@media (max-width: 700px) { .sh-perms { grid-template-columns: 1fr; } }

/* Type picker in the place-to-stay form: readable options on the dark theme */
.stay-form select.text-in { appearance: auto; }
.stay-form select.text-in option { background: #1b2433; color: var(--text); }

/* "Along the way": a small plane for left / right, then each side's sights (js/trips/along-plane.js) */
.ap { margin: 6px 0 4px; }
.ap-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 8px; }
.ap-lbl { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ap-lbl-r { text-align: right; }
.ap-fig { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ap-plane-ic { width: 190px; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.ap-plane-ic .ap-h { fill: url(#apSkin); stroke: rgba(200, 220, 245, .6); stroke-width: 1; }
.ap-plane-ic .ap-w { fill: url(#apWing); stroke: rgba(200, 220, 245, .4); stroke-width: 1; }
.ap-plane-ic .ap-e { fill: #1b2638; stroke: rgba(200, 220, 245, .5); stroke-width: 1; }
.ap-plane-ic .ap-c { fill: #0c1524; stroke: rgba(124, 199, 255, .8); stroke-width: .8; }
.ap-plane-ic .ap-wn rect { fill: rgba(124, 199, 255, .8); }
.ap-route { font-size: 12px; color: var(--muted); }
.ap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ap-side { margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--edge); font-size: 13px; }
.ap-side-left { color: #C4A7FF; }
.ap-side-right { color: #7FE0B5; text-align: right; }
.ap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-item { border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--edge); }
.ap-item.open { border-color: rgba(124, 199, 255, .55); background: rgba(124, 199, 255, .05); }
.ap-item.pinned { border-color: rgba(255, 210, 94, .45); }
.ap-item.next { border-color: #ffd25e; box-shadow: 0 0 0 3px rgba(255, 210, 94, .15); }
.ap-item.passed .ap-card > :not(.ap-star) { opacity: .5; }
.ap-card { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 6px 7px 10px; cursor: pointer; color: var(--text); }
.ap-item:hover { border-color: var(--accent); }
.ap-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.ap-when { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-txt { display: flex; flex-direction: column; min-width: 0; }
.ap-name { font-size: 13px; line-height: 1.3; }
.ap-meta { font-size: 11.5px; color: var(--muted); }
.ap-ic { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; fill: none; stroke: #7cc7ff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) {
  .ap-plane-ic { width: 130px; }
  .ap-cols { gap: 8px; }
  .ap-card { grid-template-columns: 1fr; gap: 0; padding: 6px 8px; }
  .ap-meta { display: none; }
}

/* Window views / expanded mini map: above everything on the page (the sticky right column makes its
   own layer, so it's raised as a whole while expanded) */
body.tp-full-open .tp-side { z-index: 3000; overflow: visible; }
body.tp-full-open .tp-tabbar, body.tp-full-open .topbar { visibility: hidden; }
/* Itinerary: the line that opens "Along the way" */
.aw-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--accent) !important; text-decoration: none; }
.aw-link:hover { text-decoration: underline; }
/* "Along the way" tab */
.aw-tab { padding-top: 12px; }
.aw-legs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.aw-leg { padding: 6px 12px; font-size: 12.5px; font-weight: 600; background: transparent; color: var(--text); border: 1px solid var(--edge); border-radius: 16px; }
.aw-leg[aria-selected="true"] { background: var(--accent); color: var(--night); border-color: var(--accent); }
.aw-leg .live-dot { margin: 0 0 0 6px; }
.aw-title { font-size: 15px; margin-bottom: 6px; }

/* Along the way: Next up, filters, pins, details (js/trips/along-plane.js) */
.aw-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.aw-mypins { margin-left: auto; font-size: 12.5px; font-weight: 700; color: #ffd25e !important; text-decoration: none; }
.aw-next { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; grid-template-areas: "img txt when" "img acts acts"; gap: 6px 14px; align-items: center;
  margin: 6px 0 14px; padding: 12px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 210, 94, .12), rgba(124, 199, 255, .06)); border: 1px solid rgba(255, 210, 94, .45); }
.aw-next-img { grid-area: img; width: 84px; height: 84px; border-radius: 10px; object-fit: cover; }
.aw-next-img.ph { display: grid; place-items: center; background: rgba(255, 255, 255, .05); }
.aw-next-ic { width: 38px; height: 38px; fill: none; stroke: #ffd25e; stroke-width: 1.5; }
.aw-next-txt { grid-area: txt; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.aw-next-k { color: #ffd25e; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.aw-next-name { font-size: 18px; }
.aw-next-when { grid-area: when; text-align: center; line-height: 1; }
.aw-next-when b { display: block; font-size: 30px; color: #ffd25e; }
.aw-next-when span { font-size: 11px; color: var(--muted); }
.aw-next-acts { grid-area: acts; display: flex; flex-wrap: wrap; gap: 6px; }
.aw-bar { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 10px; }
.aw-seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--edge); border-radius: 18px; overflow: hidden; }
.aw-seg button { padding: 6px 14px; font-size: 12.5px; font-weight: 600; background: transparent; color: var(--muted); border-radius: 0; }
.aw-seg button[aria-pressed="true"] { background: var(--accent); color: var(--night); }
.aw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.aw-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: 12px; font-weight: 500; background: transparent; color: var(--text); border: 1px solid var(--edge); border-radius: 14px; }
.aw-chip .ap-ic { margin: 0; }
.aw-chip[aria-pressed="true"] { background: rgba(124, 199, 255, .18); border-color: var(--accent); }
.aw-chip.star { color: #ffd25e; }
.aw-chip.star[aria-pressed="true"] { background: rgba(255, 210, 94, .18); border-color: #ffd25e; }
.aw-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.aw-q { max-width: 240px; padding: 6px 10px; }
.aw-alert { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.aw-alert select { width: auto; padding: 5px 8px; }
.aw-alert select option { background: #1b2433; }
.aw-pins { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.aw-pin-chip { padding: 3px 10px; font-size: 12px; background: rgba(255, 210, 94, .1); color: #ffd25e; border: 1px solid rgba(255, 210, 94, .4); border-radius: 12px; }
.aw-hidden-note { margin: 0 0 8px; text-align: center; }
.ap-star { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.ap-star:hover { background: rgba(255, 210, 94, .12); }
.ap-star svg { width: 19px; height: 19px; fill: none; stroke: #ffd25e; stroke-width: 1.7; stroke-linejoin: round; }
.ap-star svg path.on { fill: #ffd25e; }
.ap-more { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.ap-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; }
.ap-desc { margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.ap-sum { margin: 0; font-size: 13px; line-height: 1.5; }
.ap-facts { margin: 0; font-size: 12px; color: var(--muted); }
.ap-links { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 12px; font-weight: 600; border-radius: 8px; background: rgba(124, 199, 255, .1);
  border: 1px solid rgba(124, 199, 255, .35); color: var(--text) !important; text-decoration: none !important; cursor: pointer; }
.ap-btn:hover { border-color: var(--accent); }
.ap-btn.web { background: rgba(127, 224, 181, .12); border-color: rgba(127, 224, 181, .5); }
.ap-btn.danger { background: transparent; border-color: rgba(255, 107, 107, .5); color: #ff8b8b !important; }
.ap-note { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #ffd25e; }
.tp-pins-link { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(255, 210, 94, .45); color: #ffd25e !important; text-decoration: none; font-weight: 700; font-size: 13.5px; }
.tp-pins-link.on { background: rgba(255, 210, 94, .1); border-style: solid; }
.tp-pins-link .n { margin-left: auto; font-size: 11.5px; padding: 1px 7px; border-radius: 9px; background: rgba(255, 210, 94, .2); }
.pins-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.pins-head h2 { margin: 6px 0; }
.pins-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pins-tools .text-in { width: 220px; }
.pins-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pin-row { padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 210, 94, .35); background: rgba(255, 255, 255, .03); }
.pin-main { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) {
  .aw-next { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .aw-next-img { width: 64px; height: 64px; }
  .ap-card { grid-template-columns: minmax(0, 1fr) auto; }
  .ap-card .ap-when { grid-column: 1; }
  .ap-card .ap-txt { grid-column: 1; }
  .ap-card .ap-star { grid-column: 2; grid-row: 1 / span 2; }
}
.leg-plane { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.aw-chip.share { color: #7FE0B5; }
.aw-chip.share[aria-pressed="true"] { background: rgba(127, 224, 181, .15); border-color: #7FE0B5; }
.aw-pins.theirs .aw-pin-chip { background: rgba(127, 224, 181, .1); color: #7FE0B5; border-color: rgba(127, 224, 181, .4); text-decoration: none; }
.ap-by { font-size: 11px; color: #7FE0B5; }
.ap-their-note { margin: 0; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; background: rgba(127, 224, 181, .08); }

/* ---------- Itinerary as a journey (trips/timeline.js) ---------- */
.tl-strip { margin: 10px 0 12px; padding: 12px 10px 10px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.04); }
.tl-strip-scroll { overflow-x: auto; scrollbar-width: none; padding-top: 8px; margin-top: -8px; }   /* room for the bigger logo circles: a scrolling box clips anything above it */
.tl-strip-scroll::-webkit-scrollbar { display: none; }
.tl-stops { position: relative; display: flex; justify-content: space-between; list-style: none; margin: 2px 0 0; padding: 0; min-width: 100%; width: max-content; gap: 6px; }
.tl-stops::before, .tl-stops::after { content: ""; position: absolute; top: 8px; height: 3px; border-radius: 2px; left: 28px; }
.tl-stops::before { right: 28px; background: var(--edge); }
.tl-stops::after { width: calc((100% - 56px) * var(--fill-n, 0)); background: var(--good); }
.tl-stop { position: relative; z-index: 1; flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; font-size: 11.5px; color: var(--muted); }
.tl-stop i { width: 13px; height: 13px; border-radius: 50%; background: var(--night); border: 3px solid rgba(150, 175, 210, 0.35); }
.tl-stop span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-stop.done i { background: var(--good); border-color: var(--good); }
.tl-stop.here i { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(124, 199, 255, 0.22); animation: tl-pulse 2s ease-in-out infinite; }
.tl-stop.here, .tl-stop.dest { color: var(--text); font-weight: 700; }
.tl-stop.dest i { border-color: var(--accent); }
@keyframes tl-pulse { 50% { box-shadow: 0 0 0 9px rgba(124, 199, 255, 0.06); } }
@media (prefers-reduced-motion: reduce) { .tl-stop.here i { animation: none; } }
.tl-here { margin-top: 8px; text-align: center; font-size: 13px; color: var(--accent); }
.tl-here b { color: var(--warn); }
.tl-day { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tl-day-where { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.tl-item { border-bottom: 1px solid rgba(150, 175, 210, 0.12); }
.tl-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 4px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.tl-row:hover { background: rgba(255, 255, 255, 0.04); }
.tl-row .leg-badge { width: 34px; height: 26px; }
.tl-ic { flex: none; width: 34px; text-align: center; font-size: 18px; }
.tl-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-mid .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-right { flex: none; font-size: 12.5px; text-align: right; }
.tl-caret { flex: none; color: var(--muted); transition: transform 0.15s; font-size: 16px; }
.tl-item.open .tl-caret { transform: rotate(90deg); }
.tl-item.open { border-bottom: 0; }
.tl-body { padding: 0 0 12px; }
.tl-item.state-done .tl-row { opacity: 0.65; }
.tl-item.state-next .tl-row b, .tl-item.state-now .tl-row b { color: var(--text); }
.tl-item.state-now { box-shadow: inset 3px 0 0 var(--accent); }
.tl-item.state-next { box-shadow: inset 3px 0 0 var(--warn); }
.tl-prog { height: 4px; margin: -4px 4px 8px 48px; border-radius: 2px; background: rgba(150, 175, 210, 0.18); overflow: hidden; }
.tl-prog i { display: block; height: 100%; background: var(--accent); }
.tl-gap { display: flex; align-items: center; gap: 10px; padding: 10px 4px; }
.tl-done-day { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; margin: 12px 0 4px; padding: 9px 12px; border-radius: 10px;
  background: rgba(127, 224, 181, 0.1); border: 1px solid rgba(127, 224, 181, 0.35); color: var(--good); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.tl-done-day span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-show { flex: none; text-decoration: underline; }
.tl-body { margin-left: 44px; }
.tl-body .leg-compact { padding: 10px 12px; }
.tl-body .stay-compact { padding: 10px 12px; }
.tl-row s { opacity: 0.6; }

/* ---------- Flight details: where it is, badges, seats (trips/amenities.js, page.js legCard) ---------- */
.leg-where { display: flex; align-items: flex-start; gap: 6px; }
.leg-where .loc-ic { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--accent); }
.leg-ac { color: var(--text, #e8eef7); }
.amen-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.amen { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px 2px 8px; border-radius: 13px;
  font-size: 12.5px; line-height: 1.2; text-decoration: none; color: #cfe6ff; background: rgba(124, 199, 255, 0.12);
  border: 1px solid rgba(124, 199, 255, 0.35); }
.amen svg { width: 14px; height: 14px; flex: none; }
.amen b { font-weight: 600; }
.amen span { color: rgba(207, 230, 255, 0.72); }
a.amen:hover, a.amen:focus-visible { background: rgba(124, 199, 255, 0.22); }
.amen.meal { color: #ffe2b8; background: rgba(255, 190, 110, 0.12); border-color: rgba(255, 190, 110, 0.38); }
.amen.meal span { color: rgba(255, 226, 184, 0.72); }
.amen.good { color: var(--good); background: rgba(127, 224, 181, 0.12); border-color: rgba(127, 224, 181, 0.38); }
.amen.warn { color: var(--warn); background: rgba(242, 193, 78, 0.12); border-color: rgba(242, 193, 78, 0.38); }
.amen.bad { color: var(--bad); background: rgba(255, 138, 148, 0.12); border-color: rgba(255, 138, 148, 0.38); }
.amen.good span, .amen.warn span, .amen.bad span { color: inherit; opacity: 0.75; }
.leg-conf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.seat-row { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 3px; border-radius: 13px; font-size: 12.5px;
  background: rgba(150, 175, 210, 0.12); border: 1px solid rgba(150, 175, 210, 0.28); }
.seat-chip b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 1px 6px; border-radius: 10px;
  background: rgba(124, 199, 255, 0.2); color: var(--accent); }
.seat-chip .seat-tag { font-style: normal; font-size: 11px; color: var(--muted); }

/* ---------- Best seat side (trips/best-side.js) ---------- */
.leg-line.bs { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; line-height: 1.45;
  background: rgba(124, 199, 255, 0.07); border: 1px solid rgba(124, 199, 255, 0.22); }
.leg-line.bs.dim { background: none; border-color: transparent; padding: 2px 0; }
.bs-ic { font-size: 15px; line-height: 1.3; }
.bs-verdict { display: inline; color: var(--good); }
.bs-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.bs-pick .ap-btn[aria-pressed="true"] { background: rgba(124, 199, 255, 0.28); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ---------- Official brand logos (trips/brands.js): hotels, ships, parks, tours ---------- */
.brand-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; vertical-align: middle;
  width: 34px; height: 34px; border-radius: 9px; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 1px 3px rgba(0, 0, 0, 0.35); }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; padding: 3px; box-sizing: border-box; }
.brand-logo.wide { width: 58px; }
.brand-logo.row, .brand-logo.row.wide { width: 76px; height: 30px; border-radius: 7px; } /* same box as the airline logos in the rows */
@media (max-width: 900px) { .brand-logo.row, .brand-logo.row.wide { width: 60px; height: 26px; } }
.brand-logo.md { width: 40px; height: 40px; border-radius: 10px; }
.brand-logo.md.wide { width: 68px; }
.brand-logo.sm { width: 22px; height: 22px; border-radius: 6px; margin-right: 2px; }
.brand-logo.sm.wide { width: 40px; }
.brand-logo.sm img { padding: 2px; }
.brand-logo.pin { width: 100%; height: 100%; border-radius: 50%; box-shadow: none; }
.brand-logo.pin.wide { width: 100%; }
.tp-pin span:has(.brand-logo) { background: #fff; padding: 0; overflow: hidden; }
.brand-logo.strip { width: 100%; height: 100%; border-radius: 50%; box-shadow: none; }
.brand-logo.strip.wide { width: 100%; }
.tl-stop i:has(.brand-logo) { width: 26px; height: 26px; margin-top: -6px; border-width: 2px; background: #fff; overflow: hidden; display: flex; }
.tl-stop.done i:has(.brand-logo) { border-color: var(--good); background: #fff; }
.tl-ic .brand-logo { margin: 0 auto; }
.td-ic .brand-logo { font-size: 0; }
.tl-ic:has(.brand-logo) { width: auto; min-width: 34px; }
.lg-hero { position: relative; }
.brand-logo.hero { position: absolute; top: 14px; right: 14px; width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.brand-logo.hero.wide { width: 112px; }
.brand-logo.hero img { padding: 6px; }
.lg-hero:has(.brand-logo.hero) h2, .lg-hero:has(.brand-logo.hero) > p { padding-right: 84px; }
.lg-hero:has(.brand-logo.hero.wide) h2, .lg-hero:has(.brand-logo.hero.wide) > p { padding-right: 132px; }

/* =====================================================================
   Three panels: Trips (left) · the trip (middle) · Details (right).
   Either side folds to a thin strip ([ and ] keys); the middle widens.
   ===================================================================== */
.tp-grid { transition: grid-template-columns 0.25s ease; }
.tp-strip { display: none; }
.tp-fold { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border-radius: 9px; flex: none; }
.tp-fold svg, .tp-strip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tp-list .trips-head { display: flex; align-items: center; gap: 8px; }
.tp-list .trips-head h1 { flex: 1; }
.trips-q { width: 100%; box-sizing: border-box; margin: 2px 0 10px; }
.tp-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.tp-side-head .trips-sub { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tp-side { scrollbar-width: thin; }
.tp-side > * { flex-shrink: 0; }
.lg-dates .lg-n:empty { visibility: hidden; }
.tp-side .tp-map-card { order: 2; }
.tp-side #tp-sel { order: 1; }
.tp-side.sel-f #tp-sel { order: 3; }           /* a flight: the map first, then its summary */
.tp-side #tp-updates-card { order: 4; }
.tp-side .tp-note { order: 5; }
@media (min-width: 1241px) {
  body.fold-list .tp-grid { grid-template-columns: 46px minmax(0, 1fr) 360px; }
  body.fold-side .tp-grid { grid-template-columns: 330px minmax(0, 1fr) 46px; }
  body.fold-list.fold-side .tp-grid { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  body.fold-side .tp-side > :not(.tp-strip) { display: none !important; }
  body.fold-side .tp-strip.r { display: flex; }
}
@media (min-width: 901px) {
  body.fold-list .tp-list-body { display: none; }
  body.fold-list .tp-strip.l { display: flex; }
  body.fold-list .tp-list { overflow: visible; padding: 0; }
}
@media (min-width: 901px) and (max-width: 1240px) { body.fold-list .tp-grid { grid-template-columns: 46px minmax(0, 1fr); } .tp-side-head .tp-fold { display: none; } }
.tp-strip {
  flex-direction: column; align-items: center; gap: 12px; width: 46px; min-height: 220px; max-height: calc(100dvh - var(--topbar-h) - 40px);
  padding: 12px 0; box-sizing: border-box; border: 1px solid var(--edge); border-radius: 14px; background: rgba(255, 255, 255, 0.035);
  color: var(--muted); cursor: pointer; font: inherit; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tp-strip:hover { background: rgba(124, 199, 255, 0.1); border-color: var(--accent); color: var(--text); }
.tp-strip-ic { font-size: 17px; line-height: 1; display: grid; place-items: center; }
.tp-strip-t { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 60vh; }
.tp-strip.r .tp-strip-t { transform: none; }

/* ---------- Picking: rows and cards that open in Details ---------- */
.tl-item.sel .tl-row, .ac-card.sel { background: rgba(124, 199, 255, 0.12); box-shadow: inset 3px 0 0 var(--accent); }
.tl-row[aria-pressed="true"] .tl-caret { color: var(--accent); }
.tl-daybtn { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; border-radius: 6px; }
.tl-daybtn:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.ac-warn { display: block; margin-top: 3px; font-size: 12px; color: #FFC27A; }
.ac-card {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 8px; padding: 10px 12px; box-sizing: border-box; text-align: left;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--edge); border-radius: 12px; color: inherit; font: inherit; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.ac-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(124, 199, 255, 0.45); }
.ac-ic { flex: none; display: grid; place-items: center; width: 60px; min-height: 30px; font-size: 22px; }
.ac-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-mid b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; }
.ac-right { flex: none; font-size: 12.5px; text-align: right; }
.ac-add { margin-bottom: 4px; }
.tp-backview { display: inline-flex; margin: 6px 0 12px; font-size: 14px; font-weight: 700; }
.full-flight .leg { margin-top: 4px; }

/* ---------- Details: the summary card ---------- */
.ds-sel { position: relative; padding: 16px; background: linear-gradient(180deg, rgba(124, 199, 255, 0.08), rgba(255, 255, 255, 0.025)); border-color: rgba(124, 199, 255, 0.35); animation: ds-in 0.22s ease; }
@keyframes ds-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ds-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; padding: 0; border-radius: 8px; }
.ds-card { display: flex; flex-direction: column; gap: 10px; }
.ds-top { display: flex; align-items: center; gap: 10px; padding-right: 34px; min-height: 34px; }
.ds-top .brand-logo.hero { position: static; max-width: 120px; height: 40px; margin: 0; }
.ds-top .leg-badge.leg-logo { width: 76px; height: 30px; }
.ds-top .trip-chip { margin-left: auto; }
.ds-emoji { font-size: 28px; line-height: 1; }
.ds-kind { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.ds-title { margin: 0; font-size: 19px; line-height: 1.25; }
.ds-when { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.18); }
.ds-when b { font-size: 15px; }
.ds-when > span { color: var(--muted); font-size: 13px; }
.ds-range { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
.ds-range > span { display: flex; flex-direction: column; gap: 1px; color: var(--text); }
.ds-range > span:last-child { text-align: right; }
.ds-range small { color: var(--muted); font-size: 11px; }
.ds-range .lg-n { color: var(--muted); font-size: 12px; text-align: center !important; }
.ds-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.ds-facts li { position: relative; padding-left: 26px; overflow-wrap: anywhere; line-height: 1.4; }
.ds-facts li > span:first-child { position: absolute; left: 0; top: 0; }
.ds-facts b.mono { display: inline; }
.ds-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ds-acts .btn, .ds-acts button { padding: 8px 12px; font-size: 13px; }
.ds-acts a.btn.wa { background: #25D366; }
.ds-full {
  align-self: stretch; margin-top: 2px; padding: 10px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px;
  background: rgba(124, 199, 255, 0.14); color: var(--text); border: 1px solid rgba(124, 199, 255, 0.4); text-align: center;
}
.ds-full:hover { background: rgba(124, 199, 255, 0.24); }
.ds-card .leg-where, .ds-card .amen, .ds-card .seat-line { font-size: 13px; }
.tp-pin.act span { background: #2a2140; border-color: #C4A7FF; }

/* ---------- "Now" on travel days ---------- */
.now-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 14px 0 6px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(124, 199, 255, 0.16), rgba(196, 167, 255, 0.08)); border: 1px solid rgba(124, 199, 255, 0.35);
}
.now-card b { font-size: 15px; }
.nw-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.nw-tag.live { color: #FF8B8B; }
.nw-sep { width: 1px; height: 18px; background: var(--edge); margin: 0 4px; }
.nw-btn { margin-left: auto; }
.nw-btn .small-btn, .nw-btn .btn { padding: 7px 12px; font-size: 12.5px; }

/* ---------- Typed events ---------- */
.qa-form { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 14px; }
.qa-ic { position: absolute; left: 12px; top: 11px; font-size: 15px; pointer-events: none; }
.qa-in { flex: 1 1 100%; min-width: 0; padding-left: 36px !important; border-radius: 12px !important; background: rgba(255, 255, 255, 0.045) !important; }
.qa-in:focus { border-color: var(--accent) !important; }
.qa-busy { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.qa-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 12px; background: rgba(124, 199, 255, 0.1); border: 1px dashed rgba(124, 199, 255, 0.5); animation: ds-in 0.2s ease; }
.qa-what { flex: 1; min-width: 180px; display: flex; flex-direction: column; font-size: 13px; }
.qa-what span { color: var(--muted); }
.qa-err { font-size: 12.5px; color: #FF9B9B; }

/* ---------- Explore: three sections with jump chips ---------- */
.ex-sec { padding-top: 4px; animation: ds-in 0.18s ease; }

/* ---------- Calendar: days and items are clickable ---------- */
.cal-cell[data-day] { position: relative; cursor: pointer; transition: background 0.12s; }
.cal-cell[data-day]:hover { background: rgba(124, 199, 255, 0.1); }
.cal-add { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border-radius: 6px; font-size: 15px; line-height: 1; display: grid; place-items: center; opacity: 0; background: var(--accent); color: var(--night); transition: opacity 0.12s; }
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
button.cal-leg, button.cal-ev { display: block; width: 100%; min-height: 0; margin: 0; padding: 2px 5px; text-align: left; border: 0; border-radius: 5px; font: inherit; font-size: 11px; font-weight: 400; line-height: 1.35; cursor: pointer; }
button.cal-leg { background: rgba(124, 199, 255, 0.18); color: #D4ECFF; }
.cal-ev { display: block; padding: 2px 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev.act { background: rgba(196, 167, 255, 0.2); color: #E6DAFF; }
.cal-leg.sel, .cal-ev.sel { outline: 2px solid var(--accent); }
.cal-leg.other, .cal-ev.other { opacity: 0.55; }
button.cal-leg:hover, button.cal-ev:hover { filter: brightness(1.25); }

/* ---------- Day View pop-up ---------- */
.dv[hidden] { display: none; }
.dv { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: calc(var(--topbar-h) + 12px) 16px 16px; }
.dv-back { position: absolute; inset: 0; background: rgba(5, 10, 20, 0.62); backdrop-filter: blur(3px); animation: dv-fade 0.18s ease; }
@keyframes dv-fade { from { opacity: 0; } }
.dv-card {
  position: relative; display: flex; flex-direction: column; width: min(620px, 100%); max-height: 100%; overflow: hidden;
  background: #0F1D31; border: 1px solid rgba(124, 199, 255, 0.35); border-radius: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55); animation: dv-pop 0.2s ease;
}
@keyframes dv-pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dv-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--edge); }
.dv-head .icon-btn { width: 34px; height: 34px; padding: 0; font-size: 18px; border-radius: 9px; }
.dv-title { flex: 1; display: flex; flex-direction: column; text-align: center; }
.dv-title b { font-size: 17px; }
.dv-x { margin-left: 4px; }
.dv-qa { padding: 0 14px; }
.dv-qa .qa-form { margin: 10px 0 4px; }
.dv-allday { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--edge); }
.dv-all { padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 400; background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--edge); }
.dv-all.sel { border-color: var(--accent); }
.dv-scroll { flex: 1; min-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.dv-grid { position: relative; margin: 0 10px 0 0; }
.dv-hour { position: absolute; left: 0; right: 0; height: 52px; border-top: 1px solid rgba(150, 175, 210, 0.12); }
.dv-hour span { position: absolute; left: 8px; top: -8px; font-size: 11px; color: var(--muted); background: #0F1D31; padding: 0 4px; }
.dv-cols { position: absolute; left: 62px; right: 0; top: 0; bottom: 0; cursor: cell; touch-action: pan-y; }
.dv-ev {
  position: absolute; display: flex; flex-direction: column; gap: 1px; padding: 5px 8px; box-sizing: border-box; overflow: hidden; text-align: left;
  border-radius: 8px; border: 0; border-left: 3px solid; font: inherit; font-size: 12px; color: var(--text); cursor: pointer; transition: filter 0.12s, box-shadow 0.12s;
}
.dv-ev b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-ev span { color: rgba(230, 240, 255, 0.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-ev.short { flex-direction: row; align-items: center; gap: 8px; padding-top: 2px; padding-bottom: 2px; }
.dv-ev.fl { background: rgba(124, 199, 255, 0.22); border-color: var(--accent); }
.dv-ev.st { background: rgba(127, 224, 181, 0.16); border-color: #7FE0B5; }
.dv-ev.ac { background: rgba(196, 167, 255, 0.22); border-color: #C4A7FF; }
.dv-ev.warn { box-shadow: inset 0 0 0 1px #FFB05C; }
.dv-ev:hover { filter: brightness(1.2); }
.dv-ev.sel { box-shadow: 0 0 0 2px var(--accent); }
.dv-now { position: absolute; left: -6px; right: 0; height: 2px; background: #FF6B6B; pointer-events: none; }
.dv-now::before { content: ''; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #FF6B6B; }
.dv-draft { position: absolute; left: 2px; right: 2px; border-radius: 8px; background: rgba(124, 199, 255, 0.25); border: 2px dashed var(--accent); pointer-events: none; }
.dv-pop {
  position: absolute; left: 10%; right: 4%; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px;
  background: #16263F; border: 1px solid var(--accent); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5); cursor: default;
}
.dv-pop-row { display: flex; align-items: center; gap: 6px; }
.dv-pop-row input { flex: 1; }
.dv-pop-acts { display: flex; align-items: center; gap: 6px; }
.dv-pop-acts span { flex: 1; }
.dv-empty, .dv-hint { margin: 0; padding: 8px 14px 12px; border-top: 1px solid var(--edge); }
body.dv-open { overflow: hidden; }

/* ---------- Phones: Details is a sheet from the bottom while something is picked ---------- */
@media (max-width: 900px) {
  .tp-side-head .tp-fold, .tp-list .tp-fold { display: none; }
  body.has-sel .tp-side {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 1600; max-height: 78dvh; overflow-y: auto; padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #0F1D31; border-top: 1px solid rgba(124, 199, 255, 0.4); border-radius: 18px 18px 0 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.55); animation: sheet-up 0.22s ease;
  }
  /* the sheet's header: grab line, what's open, ✕ — stays at the top while the sheet scrolls; drag it down to close */
  body.has-sel .tp-sheet-head {
    display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; position: sticky; top: -10px; z-index: 3;
    margin: -10px -12px -6px; padding: 16px 12px 4px; background: inherit; border-radius: 18px 18px 0 0; touch-action: none; cursor: grab;
  }
  body.has-sel .tp-sheet-head .tp-grab { position: absolute; top: 7px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(150, 175, 210, 0.55); }
  body.has-sel .tp-sheet-head b { display: none; }   /* the card right below already names it (no duplicates) */
  body.has-sel .tp-sheet-x { grid-column: 3; width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 15px; }
  body.has-sel .tp-side .ds-x { display: none; }   /* the header has the ✕ */
  body.has-sel .tp-sheet-back { display: block; position: fixed; inset: 0; z-index: 1590; background: rgba(5, 10, 20, 0.45); animation: dv-fade 0.18s ease; }
  body.has-sel .tp-side.dragging { transition: none; animation: none; }
  body.has-sel .tp-side.settle { transition: transform 0.22s ease; }
  body.has-sel .tp-side #tp-updates-card, body.has-sel .tp-side .tp-note, body.has-sel .tp-side .tp-side-head { display: none; }
  body.has-sel .tp-map { height: 190px; }
  .dv { padding: calc(var(--topbar-h) + 6px) 6px 6px; }
  .dv-card { border-radius: 14px; }
  .ac-ic { width: 46px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.tp-sheet-head, .tp-sheet-back { display: none; }
@media (prefers-reduced-motion: reduce) { .ds-sel, .dv-card, .dv-back, .qa-chip, body.has-sel .tp-side { animation: none; } .tp-grid { transition: none; } }
@media (max-width: 560px) {
  .tp-tabs { gap: 0; padding: 0; }
  .tp-tabs button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: 11.5px; min-width: 0; }
  .tp-tabs button > span[aria-hidden] { font-size: 18px; line-height: 1; }
  .tp-tabs button .n { display: none; }
}
@media (hover: none), (max-width: 700px) { .cal-add { display: none; } }

.sf-sp { flex: 1; }
.sf-foot .tr-msg:empty { display: none; }

/* ---------- Tabs: the active one is filled; Explore (violet) opens its own row of tabs ---------- */
.tp-tabs button { border-radius: 10px 10px 0 0; transition: background 0.15s, color 0.15s; }
.tp-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tp-tabs button[aria-selected="true"] { background: rgba(124, 199, 255, 0.14); }
.tp-tabs button.tab-explore[aria-selected="true"] { color: #E3D6FF; background: rgba(196, 167, 255, 0.2); border-bottom-color: #C4A7FF; }
.tp-tabbar.explore .tp-tabs { border-bottom-color: rgba(196, 167, 255, 0.45); }
.tp-subtabs {
  display: flex; gap: 6px; padding: 8px 8px 9px; overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(180deg, rgba(196, 167, 255, 0.12), rgba(196, 167, 255, 0.04)); border-bottom: 1px solid rgba(196, 167, 255, 0.3);
  animation: sub-in 0.18s ease;
}
.tp-subtabs::-webkit-scrollbar { display: none; }
@keyframes sub-in { from { opacity: 0; transform: translateY(-4px); } }
.tp-subtabs button {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 400; white-space: nowrap;
  background: transparent; color: #CFC2F2; border: 1px solid rgba(196, 167, 255, 0.35); transition: background 0.15s, color 0.15s;
}
.tp-subtabs button:hover { background: rgba(196, 167, 255, 0.12); color: #fff; }
.tp-subtabs button[aria-selected="true"] { background: #C4A7FF; color: #1A1230; border-color: #C4A7FF; font-weight: 700; }
@media (max-width: 560px) { .tp-subtabs { padding: 7px 6px; } .tp-subtabs button { padding: 6px 11px; font-size: 12px; } .tp-subtabs > :first-child { margin-left: auto; } .tp-subtabs > :last-child { margin-right: auto; } }   /* centred when they fit; scrolls from the first one when they don't */
@media (prefers-reduced-motion: reduce) { .tp-subtabs, .ex-sec { animation: none; } }

/* ---------- Offline flight pack (js/offline/pack.js) ---------- */
.leg-line.ofl { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; line-height: 1.45;
  border: 1px dashed rgba(150, 175, 210, 0.4); }
.leg-line.ofl .ap-btn, .ofl-btns { margin-top: 6px; }
.ofl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.leg-line.ofl > div > .ap-btn { display: flex; width: max-content; }
.ofl-ok { border-style: solid !important; border-color: rgba(127, 224, 181, 0.45) !important; }
.ofl-ok .ofl-ic { color: var(--good); font-weight: 800; }
.ofl-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(6, 12, 22, 0.55); }
.ofl-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px 22px; border-radius: 16px;
  background: var(--pop-bg, #101C30); color: var(--text); border: 1px solid var(--edge); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); line-height: 1.5; }
.ofl-box h2 { margin: 0 0 10px; font-size: 19px; }
.ofl-box h3 { margin: 14px 0 6px; font-size: 15px; }
.ofl-box ul, .ofl-box ol { margin: 6px 0 8px; padding-left: 20px; }
.ofl-box li { margin: 3px 0; }
.ofl-note { padding: 9px 11px; border-radius: 10px; font-size: 13.5px; background: rgba(124, 199, 255, 0.1); border: 1px solid rgba(124, 199, 255, 0.3); }
.ofl-why { color: var(--muted); }
.ofl-bad { color: var(--bad); }
.ofl-qr { display: flex; gap: 14px; align-items: center; margin: 12px 0 4px; }
.ofl-qr #ofl-qr { width: 132px; height: 132px; flex: none; background: #fff; border-radius: 8px; padding: 4px; box-sizing: border-box; }
.ofl-qr #ofl-qr svg { width: 100%; height: 100%; display: block; }
.ofl-qr b, .ofl-qr span { display: block; }
.ofl-prog { margin: 10px 0; }
.ofl-bar { height: 8px; border-radius: 4px; background: rgba(150, 175, 210, 0.2); overflow: hidden; }
.ofl-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }
.ofl-step { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.ofl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Where's my plane (trip_legs.inbound) ---------- */
.leg-line.ib { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; line-height: 1.45;
  background: rgba(127, 224, 181, 0.08); border: 1px solid rgba(127, 224, 181, 0.32); }
.leg-line.ib .ap-btn { margin-left: 6px; }
.ib-verdict { color: var(--good); }
.leg-line.ib-warn { background: rgba(242, 193, 78, 0.1); border-color: rgba(242, 193, 78, 0.45); }
.ib-warn .ib-verdict { color: var(--warn); }
.leg-line.ib-bad { background: rgba(255, 138, 148, 0.1); border-color: rgba(255, 138, 148, 0.45); }
.ib-bad .ib-verdict { color: var(--bad); }
.leg-line.ib-dim { background: none; border-color: var(--edge); }

/* ---------- My flight log (trips/flight-log.js) ---------- */
.fl-page h1 { margin: 6px 0 10px; font-size: 26px; }
.fl-intro { margin: 4px 0 16px; max-width: 760px; color: var(--muted); line-height: 1.5; }
.fl-intro b { color: var(--text); }
.fl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fl-years { display: flex; flex-wrap: wrap; gap: 4px; }
.fl-years button { font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 14px; border: 1px solid var(--edge); background: none; color: var(--text); cursor: pointer; }
.fl-years button[aria-selected="true"] { border-color: var(--accent); background: rgba(124, 199, 255, .16); font-weight: 700; }
.fl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 14px 0 6px; }
.fl-stat { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(124, 199, 255, .06); }
.fl-stat b { display: block; font-size: 22px; line-height: 1.15; }
.fl-stat span { font-size: 12.5px; color: var(--muted); }
.fl-stat small { font-size: 11px; }
.fl-earth { margin: 6px 0 12px; color: var(--muted); }
.fl-map { height: 340px; border-radius: 14px; overflow: hidden; border: 1px solid var(--edge); }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
.fl-box { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--edge); }
.fl-box h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fl-box b { display: block; font-size: 15px; }
.fl-box span { font-size: 12.5px; color: var(--muted); }
.fl-chip { display: inline-flex; gap: 5px; align-items: center; margin: 2px 4px 2px 0; padding: 2px 9px; border-radius: 12px; font-size: 12.5px; background: rgba(150, 175, 210, .14); color: var(--text) !important; }
.fl-chip i { font-style: normal; color: var(--muted); }
.fl-listh { margin: 16px 0 6px; font-size: 15px; }
.fl-list { list-style: none; margin: 0; padding: 0; }
.fl-list li { display: grid; grid-template-columns: 110px 120px 1fr auto; gap: 10px; align-items: baseline; padding: 8px 2px; border-top: 1px solid var(--edge); font-size: 13.5px; }
.fl-date, .fl-num { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.fl-add { margin: 12px 0; padding: 12px; border-radius: 12px; border: 1px solid var(--edge); }
.fl-add p { margin: 0 0 8px; }
.fl-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 6px; }
.fl-add-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.fl-add-row .text-in { width: 120px; }
@media (max-width: 640px) { .fl-list li { grid-template-columns: 1fr auto; } .fl-list li .dim { grid-column: 1 / -1; } .fl-map { height: 260px; } }

/* ---------- Turbulence along the route (trips/turbulence-ui.js) ---------- */
.leg-line.tb { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; line-height: 1.45; border: 1px solid var(--edge); }
.leg-line.tb-w-moderate { background: rgba(242, 193, 78, 0.08); border-color: rgba(242, 193, 78, 0.4); }
.leg-line.tb-w-severe { background: rgba(255, 138, 148, 0.08); border-color: rgba(255, 138, 148, 0.45); }
.tb-strip { position: relative; height: 6px; margin-top: 7px; border-radius: 3px; background: rgba(127, 224, 181, 0.35); overflow: hidden; }
.tb-strip i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.tb-strip .tb-light { background: #E6C34A; }
.tb-strip .tb-moderate { background: #E8892B; }
.tb-strip .tb-severe { background: #D23B4B; }

/* /flight-log: its own page — just the log, full width (no trips list, no Details pane) */
body.tp-logpage .tp-grid:not([hidden]) { display: block; max-width: 1180px; margin: 0 auto; }
body.tp-logpage .tp-list, body.tp-logpage .tp-side { display: none !important; }
body.tp-logpage .tp-main { width: auto; max-width: none; }
.fl-upload > .trip-add:not([hidden]) { margin-bottom: 14px; }
body.tp-logpage .tp-main .trip-back { display: inline-block; }
.sh-acct-note { margin: 10px 0; padding: 9px 12px; border-radius: 10px; background: rgba(167, 139, 250, 0.16); border: 1px solid rgba(167, 139, 250, 0.45); font-size: 13.5px; }
.tp-acct-h { display: flex; align-items: center; justify-content: space-between; }

/* ---------- + Trip → Forward the email (js/trips/page.js fillForward) ---------- */
.trip-fwd { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; padding: 12px 14px; border: 1px solid rgba(124, 199, 255, 0.45); border-radius: 14px; background: rgba(124, 199, 255, 0.05); }
.trip-fwd[hidden] { display: none; }
.trip-fwd > b { font-size: 15px; }
.trip-or { display: flex; align-items: center; gap: 10px; margin: -2px 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.trip-or::before, .trip-or::after { content: ""; flex: 1; height: 1px; background: var(--edge); }
.trip-fwd-addr { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid var(--edge); border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.trip-fwd-addr code { font-weight: 700; font-size: 13px; color: var(--text); word-break: break-all; }
.trip-fwd-addr button { flex: none; padding: 5px 10px; font-size: 12.5px; }
.trip-fwd-chip { display: inline-block; margin: 2px 2px 0 0; padding: 1px 8px; border-radius: 999px; background: rgba(127, 224, 181, 0.14); color: var(--text); font-size: 12px; }
.tp-pins-link.tp-inbox { border-color: rgba(124, 199, 255, .5); color: var(--accent) !important; margin-top: 8px; }
.tp-pins-link.tp-inbox.on { background: rgba(124, 199, 255, .1); }
.tp-pins-link .n.warn { background: #E8A33A; color: #1a1205; }

/* ---------- Trips → 📨 Forwarded emails (js/trips/inbox.js) ---------- */
.fw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.fw-head h2 { margin: 0 0 4px; }
.fw-head p { margin: 0; max-width: 760px; }
.fw-addr { color: var(--text); }
.fw-msg { margin: 10px 0 0; font-size: 13px; }
.fw-msg.bad { color: #E8A33A; }
.fw-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 10px; }
.fw-tab { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--edge); background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.fw-tab i { font-style: normal; opacity: .7; margin-left: 3px; }
.fw-tab.on { background: var(--text); color: var(--night); border-color: var(--text); }
.fw-q { margin-left: auto; width: 240px; max-width: 100%; }
.fw-learn { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(167, 139, 250, 0.45); background: rgba(167, 139, 250, 0.08); font-size: 13px; }
.fw-learn b { color: #A78BFA; }
.fw-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--edge); border-radius: 12px; background: rgba(255, 255, 255, 0.02); }
.fw-row.look { border-left: 4px solid #E8A33A; }
.fw-row.open { border-color: rgba(124, 199, 255, 0.5); }
.fw-main { display: grid; grid-template-columns: 80px minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.4fr); gap: 12px; align-items: center; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.fw-when { font-size: 12px; color: var(--muted); } .fw-when b { display: block; color: var(--text); font-size: 13px; }
.fw-subj { min-width: 0; } .fw-subj b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fw-subj small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-found { font-size: 12.5px; min-width: 0; } .fw-found span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fw-found small { display: block; color: var(--muted); font-size: 11.5px; }
.fw-res { min-width: 0; } .fw-res b { display: block; font-size: 13.5px; } .fw-res small { display: block; color: var(--muted); font-size: 12px; }
.fw-st { display: inline-block; margin-bottom: 3px; padding: 1px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.fw-st.add { background: rgba(127, 224, 181, 0.16); color: var(--good); } .fw-st.new { background: rgba(124, 199, 255, 0.16); color: var(--accent); }
.fw-st.upd { background: rgba(167, 139, 250, 0.16); color: #A78BFA; } .fw-st.chk, .fw-st.wait { background: rgba(255, 196, 92, 0.18); color: #E8A33A; }
.fw-st.no { background: rgba(150, 175, 210, 0.16); color: var(--muted); } .fw-st.bad { background: rgba(255, 107, 107, 0.16); color: #FF8A8A; }
.fw-row.look .fw-st { background: rgba(255, 196, 92, 0.18); color: #E8A33A; }
.fw-conf { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.fw-conf i { display: block; width: 44px; height: 5px; border-radius: 9px; background: rgba(150, 175, 210, 0.25); overflow: hidden; } .fw-conf i span { display: block; height: 100%; }
.fw-acts { position: relative; display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.fw-acts button, .fw-acts .small-btn { font-size: 12.5px; padding: 6px 11px; }
.fw-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(430px, 86vw); padding: 8px; border: 1px solid var(--edge); border-radius: 14px; background: var(--pop-bg, #13233B); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35); }
.fw-menu h4 { margin: 4px 6px 6px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fw-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.fw-opt:hover, .fw-opt:focus-visible { background: rgba(124, 199, 255, 0.1); }
.fw-opt b { font-size: 13.5px; } .fw-opt small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; } .fw-opt .pct { font-size: 12px; font-weight: 800; color: var(--good); }
.fw-opt .why { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; } .fw-opt .why i { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(124, 199, 255, 0.12); color: var(--accent); }
.fw-sep { height: 1px; background: var(--edge); margin: 6px 4px; }
.fw-find { width: calc(100% - 8px); box-sizing: border-box; margin: 2px 4px 6px; }
.fw-new { display: flex; gap: 6px; padding: 6px 4px; } .fw-new .text-in { flex: 1; }
.fw-detail { grid-column: 1 / -1; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--edge); font-size: 13px; }
.fw-detail h4 { margin: 0 0 6px; font-size: 13px; } .fw-detail ul { margin: 0; padding-left: 18px; } .fw-detail p { margin: 6px 0 0; }
@media (max-width: 1100px) { .fw-main { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); } .fw-found { display: none; } }
@media (max-width: 760px) {
  .fw-row { grid-template-columns: minmax(0, 1fr); }
  .fw-main { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .fw-when { grid-column: 2; grid-row: 1; text-align: right; } .fw-subj { grid-column: 1; grid-row: 1; } .fw-res { grid-column: 1 / -1; }
  .fw-acts { justify-content: flex-start; } .fw-menu { left: 0; right: auto; }
  .fw-q { margin-left: 0; width: 100%; }
}
/* the list fits whatever room the trip page leaves it */
.fw-list { container-type: inline-size; }
@container (max-width: 860px) {
  .fw-row { grid-template-columns: minmax(0, 1fr); }
  .fw-main { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .fw-subj { grid-column: 1; grid-row: 1; } .fw-when { grid-column: 2; grid-row: 1; text-align: right; }
  .fw-found { display: block; grid-column: 1; grid-row: 2; } .fw-res { grid-column: 2; grid-row: 2; max-width: 230px; }
  .fw-acts { justify-content: flex-start; }
  .fw-menu { left: 0; right: auto; }
}
@container (max-width: 520px) { .fw-found { grid-column: 1 / -1; } .fw-res { grid-column: 1 / -1; grid-row: 3; max-width: none; } }
.trip-fwd-addr code { font-family: var(--font); white-space: nowrap; word-break: normal; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Follow my flight dialog (trips/follow-share.js) */
.fl-dlg { width: min(520px, calc(100vw - 24px)); }
.fl-body .meet-top h2 { font-size: 18px; }
.fl-body > p.dim { margin: 2px 0 6px; }
.fl-opt { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 13px; border: 1px solid var(--edge); border-radius: 12px; cursor: pointer; }
.fl-opt.on { border-color: var(--accent); background: rgba(124, 199, 255, 0.08); }
.fl-opt input { accent-color: var(--accent); margin: 0; }
.fl-opt .fl-ic { font-size: 19px; }
.fl-opt b { display: block; font-size: 14px; } .fl-opt small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.fl-link { margin-top: 14px; } .fl-link code { display: block; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.04); font: 13px ui-monospace, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.fl-acts .btn { text-decoration: none; }
.fl-stop { color: var(--bad); margin-left: 4px; }
.fl-msg { color: var(--bad); font-size: 13px; }
.fl-others { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--edge); }
.fl-other { display: flex; align-items: center; gap: 10px; padding: 5px 0; } .fl-other code { font-size: 12.5px; }

/* Who's on this trip? (trips/crew-strip.js) */
.cw-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 2px; }
.cw-h { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.cw-p { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border: 1px solid var(--edge); border-radius: 22px; background: rgba(255, 255, 255, 0.03); }
.cw-p b { display: block; font-size: 12.5px; line-height: 1.2; } .cw-p small { display: block; font-size: 11px; color: var(--muted); }
.cw-av { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; }
.cw-av.ghost { background: transparent !important; color: var(--muted); border: 2px dashed var(--edge); }
.cw-btn { padding: 4px 10px; font-size: 12px; border-radius: 14px; }
.sh-invite { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 13px; border-radius: 12px; border: 1px solid rgba(124, 199, 255, 0.45); background: rgba(124, 199, 255, 0.08); }
.sh-invite > span { font-size: 20px; } .sh-invite > div { flex: 1; }
/* the list's hide button next to "+ Trip": .trips-head button's padding was squeezing the arrow off-center */
.trips-head .tp-fold, .tp-side-head .tp-fold { padding: 0; width: 32px; height: 32px; border-radius: 50%; }
.trips-head #trip-add-btn { height: 32px; display: inline-flex; align-items: center; }
/* "Who's on this trip?" as chips (2 per line on phones); tap one for its card (trips/crew-strip.js) */
.cw-strip { display: block; }
.cw-h { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.cw-h small { font-weight: 400; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cw-chip { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 3px 11px 3px 3px; border: 1.5px solid var(--edge); border-radius: 22px; background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.cw-chip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-chip small { color: var(--muted); font-size: 12px; margin-left: auto; padding-left: 4px; }
.cw-chip .cw-ok { color: var(--good); font-weight: 800; }
.cw-chip .cw-q { color: var(--warn); font-weight: 800; }
.cw-chip.ghost { border-style: dashed; }
.cw-chip.on, .cw-chip:hover { border-color: var(--accent); }
.cw-chip .cw-av, .cw-card .cw-av { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font: 700 10.5px/1 sans-serif; }
.cw-av.ghost { background: transparent !important; color: var(--muted); border: 1.5px dashed var(--muted); }
.cw-card { margin-top: 9px; padding: 12px 14px; border: 1px solid var(--edge); border-radius: 14px; background: var(--panel); box-shadow: 0 10px 28px rgba(10, 20, 45, 0.18); max-width: 440px; }
.cw-card .cw-who { display: flex; gap: 10px; align-items: center; }
.cw-card .cw-who b { display: block; font-size: 15px; }
.cw-card .cw-who small { display: block; color: var(--muted); font-size: 12.5px; }
.cw-booked { margin: 9px 0; padding: 7px 10px; border-radius: 9px; background: rgba(124, 199, 255, 0.08); font-size: 12.5px; color: var(--muted); }
.cw-booked b { color: var(--text); letter-spacing: .02em; }
.cw-acts { display: flex; gap: 12px; align-items: center; }
.cw-card .na-ask { border: 0; padding: 0; background: none; }
.cw-x { margin-top: 6px; }
@media (max-width: 760px) { .cw-chips { display: grid; grid-template-columns: 1fr 1fr; } .cw-chip { width: 100%; } }

/* Public holidays (trips/holidays.js, Nager.Date): a line under the day in the day-by-day list, and a list at the
   top of the Safety tab */
.tl-hol { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; margin: 2px 0 4px; border-radius: 10px; font-size: 13.5px;
  background: rgba(245, 185, 66, 0.12); border: 1px solid rgba(245, 185, 66, 0.35); }
.tl-hol > span:first-child { font-size: 16px; line-height: 1.2; }
.ti-hols { margin: 14px 0 18px; padding: 14px 18px; border-radius: 16px; background: rgba(245, 185, 66, 0.10); border: 1px solid rgba(245, 185, 66, 0.35); }
.ti-hols h3 { margin: 0 0 8px; font-size: 15px; }
.ti-hols ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.ti-hols p { margin: 8px 0 0; }
/* Country card (trips/country.js), at the top of the Safety tab */
.cc-card .ti-head h3 .cc-flag { font-size: 22px; margin-right: 6px; vertical-align: -2px; }
.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cc-tile { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.03); min-width: 0; }
.cc-tile small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.cc-tile b { display: block; font-size: 14.5px; overflow-wrap: anywhere; }
.cc-tile span { display: block; font-size: 12.5px; color: var(--muted); }
.cc-tile.warn b { color: #FB923C; }
.cc-src { margin: 8px 0 0; }
