:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}
.bp-trip-panel, .bp-trip-launcher, .bp-trip-toast {
  font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--cp-text);
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: 16px;
}
.bp-trip-launcher {
  position: fixed;
  bottom: calc(230px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 1200;
  padding: 12px 16px;
  background: var(--cp-accent);
  color: var(--cp-accent-fg);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--cp-shadow);
}
.bp-trip-launcher span[data-bp-trip-count] {
  display: inline-block;
  padding: 0 8px;
  margin-left: 4px;
  border: 1px solid var(--cp-accent-fg);
  border-radius: 10px;
}
.bp-trip-panel {
  margin: auto;
  padding: 0;
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow: var(--cp-shadow);
}
.bp-trip-panel::backdrop { background: var(--cp-overlay); }
.bp-trip-panel .bp-trip-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--cp-surface);
  border-bottom: 1px solid var(--cp-border);
  padding: 16px 20px;
  backdrop-filter: none;
}
.bp-trip-head h2 { margin: 0; font: inherit; font-size: 1.4rem; font-weight: 700; color: var(--cp-text); }
.bp-trip-content { padding: 0 20px 20px; }
.bp-trip-panel button, .bp-trip-panel select {
  font: inherit;
  background: var(--cp-surface-soft);
  color: var(--cp-text);
  border: 1px solid var(--cp-border-strong);
  border-radius: 0.625rem;
  padding: 8px 12px;
  min-height: 44px;
}
.bp-trip-panel button { cursor: pointer; }
.bp-trip-panel button:hover { background: var(--cp-highlight); }
.bp-trip-panel button:disabled { opacity: 0.5; cursor: default; }
.bp-trip-panel a { color: var(--cp-link); text-decoration: underline; }
.bp-trip-panel :focus-visible, .bp-trip-launcher:focus-visible { outline: 3px solid var(--cp-accent); outline-offset: 3px; }
.bp-trip-stops { padding-left: 24px; }
.bp-trip-stops li { padding: 12px 0; border-bottom: 1px solid var(--cp-border); }
.bp-trip-stops small { display: block; color: var(--cp-text-muted); }
.bp-trip-stop-actions, .bp-trip-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bp-trip-stop-actions label { display: flex; align-items: center; gap: 8px; }
.bp-trip-stop-actions select { width: auto; }
.bp-trip-panel details { padding: 12px 0; border-bottom: 1px solid var(--cp-border); }
.bp-trip-panel summary { cursor: pointer; font-weight: 600; }
.bp-trip-panel p { line-height: 1.6; }
.bp-trip-open { overflow: hidden; }
.bp-trip-added { font-weight: 700; }
.bp-trip-toast {
  position: fixed;
  z-index: 1300;
  bottom: calc(292px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: max-content;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 16px;
  box-shadow: var(--cp-shadow);
}
.bp-trip-toast:empty, .bp-trip-toast[hidden] { display: none; }
.bp-trip-error { border: 2px solid var(--cp-danger); }
.bp-trip-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
  .bp-trip-panel .bp-trip-head, .bp-trip-content { padding-left: 12px; padding-right: 12px; }
  .bp-trip-head h2 { font-size: 1.2rem; }
}
@media print {
  body.bp-trip-open > :not(.bp-trip-panel) { display: none !important; }
  .bp-trip-launcher, .bp-trip-toast { display: none !important; }
  .bp-trip-panel[open] { position: static; width: auto; max-height: none; overflow: visible; border: 0; box-shadow: none; }
  .bp-trip-panel .bp-trip-head { position: static; }
  .bp-trip-panel button, .bp-trip-panel select, .bp-trip-actions { display: none !important; }
}
