/* CHRISTOPHER — Weathered Miami Beach Deco x Hawaii Coastal Tactical HUD (GPU-Fast) */

:root {
  /* Sun-baked volcanic basalt & deep Pacific lagoon slate */
  --bg: #0c171b;
  --glass: rgba(15, 28, 33, 0.80);
  --glass-strong: rgba(13, 24, 29, 0.95);
  --surface: rgba(23, 41, 47, 0.86);
  --surface-deep: rgba(11, 22, 26, 0.90);

  /* Sun-bleached coral sand & salt-oxidized borders */
  --border: rgba(238, 212, 174, 0.28);
  --border-salt: rgba(42, 238, 220, 0.34);
  --border-hi: rgba(255, 108, 122, 0.84);

  /* Sun-bleached coastal typography */
  --text: #efe3cf;
  --text-bright: #fff8ec;
  --text-dim: #a6bab8;
  --sand: #f0d7ae;
  --sand-dim: rgba(240, 215, 174, 0.16);

  /* Miami Beach Deco & Hawaii Reef accents (sun-faded, wind-washed, zero cultural motifs) */
  --flamingo: #ff5f8d;       /* South Beach Art Deco flamingo pink */
  --coral: #ff7c61;          /* Sun-baked lifeguard coral */
  --coral-bright: #ff9c84;
  --coral-dim: rgba(255, 124, 97, 0.22);
  --sunset: #f8be5a;         /* Golden-hour tropical amber */
  --aqua: #26ebd8;           /* Biscayne & Pacific reef turquoise */
  --aqua-dim: rgba(38, 235, 216, 0.18);
  --chartreuse: #26ebd8;
  --chartreuse-dim: rgba(38, 235, 216, 0.18);

  /* Distinct travel modes — coastal clarity */
  --drive: #f8be5a;   /* Golden-hour amber */
  --bus: #59b8ff;     /* Azure coach highway */
  --train: #ff9248;   /* Sunset rail tangerine */
  --ferry: #26ebd8;   /* Reef lagoon turquoise */
  --flight: #ff699b;  /* Miami flamingo sunset */
  --walk: #6cf0b0;    /* Tumbled sea-glass mint */
  --warn: #ff5852;    /* Sun-scorched flare red */

  /* Lightweight GPU-fast static SVG weathering textures (pure primitives — zero live feTurbulence filter cost) */
  --tex-sand-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cg fill='%23f6e2c1' fill-opacity='0.065'%3E%3Ccircle cx='12' cy='14' r='0.75'/%3E%3Ccircle cx='39' cy='8' r='0.6'/%3E%3Ccircle cx='71' cy='21' r='0.8'/%3E%3Ccircle cx='86' cy='47' r='0.7'/%3E%3Ccircle cx='24' cy='52' r='0.85'/%3E%3Ccircle cx='58' cy='61' r='0.65'/%3E%3Ccircle cx='17' cy='82' r='0.7'/%3E%3Ccircle cx='49' cy='89' r='0.75'/%3E%3Ccircle cx='78' cy='77' r='0.8'/%3E%3Ccircle cx='63' cy='34' r='0.6'/%3E%3C/g%3E%3Cg fill='%2326ebd8' fill-opacity='0.045'%3E%3Ccircle cx='30' cy='29' r='0.7'/%3E%3Ccircle cx='81' cy='12' r='0.65'/%3E%3Ccircle cx='9' cy='66' r='0.7'/%3E%3Ccircle cx='43' cy='73' r='0.65'/%3E%3Ccircle cx='91' cy='88' r='0.7'/%3E%3C/g%3E%3C/svg%3E");
  --tex-wind-scour: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg stroke='%23f6e2c1' stroke-opacity='0.09' stroke-width='1' stroke-linecap='round'%3E%3Cline x1='-20' y1='22' x2='155' y2='4'/%3E%3Cline x1='85' y1='52' x2='275' y2='32'/%3E%3Cline x1='-10' y1='96' x2='190' y2='75'/%3E%3Cline x1='40' y1='144' x2='265' y2='120'/%3E%3Cline x1='-25' y1='192' x2='148' y2='174'/%3E%3Cline x1='110' y1='236' x2='270' y2='218'/%3E%3C/g%3E%3Cg stroke='%2326ebd8' stroke-opacity='0.075' stroke-width='0.9'%3E%3Cline x1='15' y1='38' x2='230' y2='16'/%3E%3Cline x1='-15' y1='128' x2='205' y2='106'/%3E%3Cline x1='60' y1='210' x2='250' y2='190'/%3E%3C/g%3E%3Cg fill='%23f6e2c1' fill-opacity='0.14'%3E%3Ccircle cx='24' cy='18' r='0.9'/%3E%3Ccircle cx='142' cy='41' r='1.1'/%3E%3Ccircle cx='216' cy='88' r='0.8'/%3E%3Ccircle cx='68' cy='132' r='1.0'/%3E%3Ccircle cx='188' cy='172' r='0.9'/%3E%3Ccircle cx='34' cy='224' r='1.1'/%3E%3Ccircle cx='236' cy='240' r='0.8'/%3E%3C/g%3E%3Cg fill='%23ff8870' fill-opacity='0.11'%3E%3Ccircle cx='96' cy='26' r='0.9'/%3E%3Ccircle cx='18' cy='156' r='0.8'/%3E%3Ccircle cx='204' cy='142' r='1.0'/%3E%3C/g%3E%3C/svg%3E");
  --tex-salt-patina: linear-gradient(118deg, rgba(240, 215, 174, 0.04) 0%, rgba(255, 124, 97, 0.03) 34%, rgba(38, 235, 216, 0.05) 72%, rgba(240, 215, 174, 0.03) 100%);

  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Bahnschrift", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Sun-bleached coastal glare (warm Miami sunset upper-right) + Pacific reef mist (lower-left) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse 62% 38% at 92% 0%, rgba(255, 114, 134, 0.16) 0%, rgba(248, 190, 90, 0.07) 38%, transparent 72%),
    radial-gradient(ellipse 54% 44% at 6% 100%, rgba(38, 235, 216, 0.14) 0%, rgba(16, 70, 74, 0.05) 42%, transparent 72%);
}

button, input, select, textarea, kbd, code {
  font-family: inherit;
}

kbd {
  display: inline-block;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid rgba(240, 215, 174, 0.38);
  background: rgba(14, 26, 30, 0.88);
  color: var(--sand);
  font-size: 10px;
  font-weight: 600;
}

.metric-val, .metric-lbl, .row-meta, .readout-box, .pill, .compare-table, .pin-num, .stop-badge {
  font-variant-numeric: tabular-nums;
}

body[data-reduced-motion="true"] *,
body[data-reduced-motion="true"] *::before,
body[data-reduced-motion="true"] *::after {
  transition: none !important;
  animation: none !important;
}

:focus-visible {
  outline: 2px solid var(--flamingo);
  outline-offset: 2px;
}

.hidden { display: none !important; }

/* FULLSCREEN 3D GLOBE + STREET-LEVEL MAP STAGE (OVERSCANNED BEYOND VIEWPORT EDGES) */
#globeStage {
  position: fixed;
  inset: -4px;
  width: calc(100vw + 8px);
  height: calc(100vh + 8px);
  background: radial-gradient(circle at 76% 18%, #21373d 0%, #112228 48%, #091317 100%);
  z-index: 1;
}

#globeStage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#globeStage canvas:active { cursor: grabbing; }

.maplibre-full-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.maplibregl-ctrl-attrib.maplibregl-compact {
  background: rgba(12, 24, 29, 0.78) !important;
  color: var(--sand) !important;
  border: 1px solid rgba(240, 215, 174, 0.25);
  margin: 0 14px 56px 0 !important;
}
.maplibregl-ctrl-attrib a {
  color: var(--aqua) !important;
}

.globe-pin-label.maplibre-pin {
  position: relative;
  top: auto;
  left: auto;
}
.globe-pin-label .pin-stay {
  font-size: 10px;
  margin-left: 2px;
}

.vehicle-pill.maplibre-vehicle {
  position: relative;
  top: auto;
  left: auto;
}

.map-hotel-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  background: linear-gradient(155deg, rgba(48, 34, 22, 0.94), rgba(18, 26, 30, 0.95));
  border: 1px solid rgba(248, 190, 90, 0.85);
  color: #fff3d6;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.65);
}
.map-hotel-pin:hover {
  border-color: var(--flamingo);
  background: rgba(78, 30, 42, 0.96);
  color: #fff;
}

.map-gas-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 3px;
  background: linear-gradient(155deg, rgba(18, 32, 36, 0.96), rgba(10, 19, 23, 0.98));
  border: 1.5px solid rgba(248, 190, 90, 0.88);
  color: var(--text-bright);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.68);
  transition: transform 100ms ease, border-color 100ms ease;
}
.map-gas-pin .gas-pin-price {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--sunset);
  font-weight: 800;
}
.map-gas-pin .gas-pin-brand {
  color: var(--sand);
  font-size: 9.5px;
  font-weight: 600;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-gas-pin:hover {
  border-color: var(--aqua);
  transform: translateY(-1px);
}
.map-gas-pin.cheapest {
  border-color: var(--walk);
  background: linear-gradient(155deg, rgba(14, 48, 40, 0.97), rgba(10, 26, 24, 0.98));
  box-shadow: 0 0 12px rgba(108, 240, 176, 0.36);
}
.map-gas-pin.cheapest .gas-pin-price {
  color: var(--walk);
}
.map-gas-pin.selected {
  border-color: var(--flamingo);
  background: linear-gradient(145deg, rgba(84, 34, 44, 0.97), rgba(24, 24, 30, 0.98));
  box-shadow: 0 0 16px rgba(255, 95, 141, 0.52);
  z-index: 4;
}
.map-gas-pin.selected .gas-pin-price {
  color: #fff2ed;
}

/* FULL-MAP EXPAND MODE */
body[data-full-map="true"] .left-panel {
  transform: translateX(-115%);
  opacity: 0;
  pointer-events: none;
}
body[data-full-map="true"] .right-panel {
  transform: translateX(115%);
  opacity: 0;
  pointer-events: none;
}
.left-panel, .right-panel {
  transition: transform 180ms ease, opacity 160ms ease;
}

/* SCREEN-SPACE PROJECTED STOP PINS & VEHICLE BADGE */
#globeOverlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.globe-pin-label {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 3px;
  border-radius: 3px;
  background:
    var(--tex-sand-grain),
    linear-gradient(155deg, rgba(28, 48, 54, 0.94), rgba(14, 26, 30, 0.95));
  border: 1px solid rgba(240, 215, 174, 0.52);
  border-left: 3px solid var(--walk);
  color: var(--text-bright);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 236, 206, 0.28);
}
.globe-pin-label.terminal {
  border-left-color: var(--ferry);
  border-color: rgba(38, 235, 216, 0.72);
}
.globe-pin-label.selected {
  background:
    var(--tex-sand-grain),
    linear-gradient(145deg, rgba(84, 34, 44, 0.96), rgba(30, 26, 32, 0.96));
  border-color: var(--flamingo);
  border-left-color: var(--sunset);
  color: var(--text-bright);
  box-shadow:
    0 0 18px rgba(255, 95, 141, 0.52),
    inset 0 1px 0 rgba(255, 218, 194, 0.42);
  z-index: 3;
}
.globe-pin-label .pin-num {
  width: 17px;
  height: 17px;
  border-radius: 2px;
  background: rgba(108, 240, 176, 0.22);
  color: var(--walk);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.globe-pin-label.terminal .pin-num {
  background: rgba(38, 235, 216, 0.24);
  color: var(--ferry);
}
.globe-pin-label.selected .pin-num {
  background: linear-gradient(135deg, var(--flamingo), var(--coral));
  color: #1c0c10;
}

.vehicle-pill {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  background:
    var(--tex-sand-grain),
    linear-gradient(155deg, rgba(24, 38, 42, 0.96), rgba(12, 22, 26, 0.97));
  border: 1.5px solid var(--drive);
  color: var(--drive);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 232, 192, 0.28);
  z-index: 6;
}
.vehicle-pill.mode-bus {
  border-color: var(--bus);
  color: var(--bus);
  box-shadow: 0 0 20px rgba(89, 184, 255, 0.45);
}
.vehicle-pill.mode-ferry {
  border-color: var(--ferry);
  color: var(--ferry);
  box-shadow: 0 0 20px rgba(38, 235, 216, 0.50);
}
.vehicle-pill.mode-train {
  border-color: var(--train);
  color: var(--train);
  box-shadow: 0 0 20px rgba(255, 146, 72, 0.45);
}
.vehicle-pill.mode-flight {
  border-color: var(--flight);
  color: var(--flight);
  box-shadow: 0 0 20px rgba(255, 105, 155, 0.48);
}
.vehicle-pill.mode-walk {
  border-color: var(--walk);
  color: var(--walk);
}

/* HUD LAYER */
.hud-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 10px;
  gap: 8px;
}

/* WEATHERED MIAMI BEACH DECO x HAWAII REEF BASALT TACTICAL GLASS */
.glass {
  position: relative;
  background-color: var(--glass);
  background-image:
    var(--tex-sand-grain),
    var(--tex-wind-scour),
    var(--tex-salt-patina),
    linear-gradient(
      142deg,
      rgba(248, 206, 154, 0.14) 0%,
      rgba(255, 108, 128, 0.09) 22%,
      rgba(16, 34, 40, 0.06) 54%,
      rgba(38, 235, 216, 0.12) 100%
    );
  border: 1px solid var(--border);
  border-top-color: rgba(248, 224, 186, 0.46);
  border-left-color: rgba(240, 215, 174, 0.34);
  border-right-color: rgba(255, 124, 97, 0.26);
  border-bottom-color: rgba(38, 235, 216, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 5px;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 238, 210, 0.28),
    inset 0 -1px 0 rgba(38, 235, 216, 0.22);
}

/* Iconic weathered Miami Beach sunset-to-reef Art Deco twin stripe on major panels */
.top-bar::after,
.left-panel::after,
.right-panel::after,
.bottom-dock::after,
.modal-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 2.5px;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 22px,
      rgba(16, 30, 35, 0.32) 22px,
      rgba(16, 30, 35, 0.32) 25px
    ),
    linear-gradient(
      90deg,
      rgba(255, 95, 141, 0.88) 0%,
      rgba(255, 124, 97, 0.86) 24%,
      rgba(248, 190, 90, 0.78) 46%,
      rgba(240, 215, 174, 0.28) 56%,
      rgba(38, 235, 216, 0.88) 82%,
      rgba(108, 240, 176, 0.72) 100%
    );
  opacity: 0.90;
}

/* Tactical corner brackets */
.left-panel::before,
.right-panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border-radius: 2px;
  background:
    linear-gradient(var(--sand), var(--sand)) top left / 11px 1.5px no-repeat,
    linear-gradient(var(--sand), var(--sand)) top left / 1.5px 11px no-repeat,
    linear-gradient(var(--flamingo), var(--flamingo)) top right / 11px 1.5px no-repeat,
    linear-gradient(var(--flamingo), var(--flamingo)) top right / 1.5px 11px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) bottom left / 11px 1.5px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) bottom left / 1.5px 11px no-repeat,
    linear-gradient(var(--sunset), var(--sunset)) bottom right / 11px 1.5px no-repeat,
    linear-gradient(var(--sunset), var(--sunset)) bottom right / 1.5px 11px no-repeat;
  opacity: 0.54;
  z-index: 0;
}

.left-panel > *,
.right-panel > * {
  position: relative;
  z-index: 1;
}

/* SINGLE-ROW TOP BAR */
.top-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  flex-wrap: nowrap;
  z-index: 30;
}

.brand-group, .view-group, .action-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.brand-badge {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 134, 146, 0.85);
  border-bottom-color: rgba(38, 235, 216, 0.85);
  background:
    var(--tex-sand-grain),
    linear-gradient(142deg, rgba(255, 95, 141, 0.45) 0%, rgba(248, 190, 90, 0.32) 52%, rgba(38, 235, 216, 0.36) 100%);
  color: var(--text-bright);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13.5px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 240, 216, 0.48), 0 0 12px rgba(255, 95, 141, 0.28);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-bright);
  font-size: 13px;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(255, 95, 141, 0.35);
}

/* Art Deco 3-bar coastal horizon emblem */
.deco-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 2px;
  flex-shrink: 0;
}
.deco-bars span {
  display: block;
  height: 1.8px;
  border-radius: 1px;
}
.deco-bars span:nth-child(1) { width: 14px; background: linear-gradient(90deg, var(--flamingo), var(--coral)); }
.deco-bars span:nth-child(2) { width: 10px; background: var(--sunset); }
.deco-bars span:nth-child(3) { width: 6px;  background: var(--aqua); }

.trip-select {
  background:
    var(--tex-sand-grain),
    linear-gradient(180deg, rgba(22, 40, 46, 0.94), rgba(13, 25, 30, 0.96));
  border: 1px solid var(--border);
  border-top-color: rgba(248, 224, 186, 0.40);
  color: var(--text-bright);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11.5px;
  font-weight: 600;
  height: 26px;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 185px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.basemap-select {
  max-width: 106px;
  padding: 3px 6px;
}
.trip-select:hover { border-color: var(--aqua); }

/* TOOLS DROPDOWN MENU */
.tools-menu {
  position: relative;
}
.tools-menu > summary {
  list-style: none;
}
.tools-menu > summary::-webkit-details-marker {
  display: none;
}
.tools-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 184px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background-color: var(--glass-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.72);
}
.tools-popover .btn {
  width: 100%;
  justify-content: flex-start;
}

/* BUTTONS, CHIPS, PILLS */
.btn, .chip {
  background:
    var(--tex-sand-grain),
    linear-gradient(180deg, rgba(31, 52, 59, 0.90) 0%, rgba(16, 30, 35, 0.94) 100%);
  border: 1px solid rgba(240, 215, 174, 0.28);
  border-top-color: rgba(252, 232, 198, 0.42);
  border-bottom-color: rgba(8, 17, 20, 0.85);
  color: var(--text);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.015em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 240, 216, 0.14);
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.chip {
  border-radius: 3px;
}
.btn:hover, .chip:hover {
  border-color: var(--flamingo);
  color: var(--text-bright);
  box-shadow: 0 0 10px rgba(255, 95, 141, 0.24), inset 0 1px 0 rgba(255, 226, 208, 0.22);
}
.btn.active, .chip.active {
  background:
    var(--tex-sand-grain),
    linear-gradient(145deg, rgba(255, 95, 141, 0.30) 0%, rgba(255, 124, 97, 0.24) 55%, rgba(248, 190, 90, 0.18) 100%);
  border-color: var(--flamingo);
  border-top-color: #ffb0be;
  color: #fff2ed;
  box-shadow: 0 0 12px rgba(255, 95, 141, 0.28), inset 0 1px 0 rgba(255, 226, 208, 0.32);
}
.btn-ferry {
  border-color: rgba(38, 235, 216, 0.62);
  color: var(--ferry);
  background:
    var(--tex-sand-grain),
    linear-gradient(160deg, rgba(24, 62, 66, 0.90), rgba(14, 34, 38, 0.94));
}
.btn-ferry:hover, .btn-ferry.active {
  background:
    var(--tex-sand-grain),
    linear-gradient(145deg, rgba(38, 235, 216, 0.30), rgba(22, 86, 86, 0.45));
  border-color: var(--ferry);
  color: #ebfffd;
  box-shadow: 0 0 12px rgba(38, 235, 216, 0.32);
}
.btn-sm { padding: 3px 7px; font-size: 11px; }
.btn-xs { padding: 2px 5px; font-size: 10px; }
.btn-danger {
  border-color: rgba(255, 88, 82, 0.50);
  color: #ffc1bc;
}
.btn-danger:hover {
  border-color: var(--warn);
  color: #fff;
  background: rgba(176, 38, 34, 0.52);
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.btn-inline {
  background: transparent;
  border: 1px solid rgba(240, 215, 174, 0.28);
  border-radius: 3px;
  color: var(--aqua);
  font-size: 10px;
  font-weight: 600;
  padding: 0 5px;
  line-height: 1.5;
  cursor: pointer;
}
.btn-inline:hover {
  border-color: var(--flamingo);
  color: var(--text-bright);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(240, 215, 174, 0.34);
  background: rgba(14, 26, 31, 0.92);
  color: var(--sand);
  white-space: nowrap;
}
.pill-ok {
  border-color: rgba(38, 235, 216, 0.62);
  background: linear-gradient(135deg, rgba(22, 74, 70, 0.62), rgba(16, 46, 48, 0.72));
  color: var(--aqua);
}
.pill-chartreuse { border-color: var(--aqua); background: var(--aqua-dim); color: #dcfffb; }
.pill-ferry { border-color: rgba(38, 235, 216, 0.65); color: var(--ferry); background: rgba(38, 235, 216, 0.15); }
.pill-drive { border-color: rgba(248, 190, 90, 0.65); color: var(--drive); background: rgba(248, 190, 90, 0.15); }
.pill-bus { border-color: rgba(89, 184, 255, 0.65); color: var(--bus); background: rgba(89, 184, 255, 0.16); }
.pill-train { border-color: rgba(255, 146, 72, 0.65); color: var(--train); background: rgba(255, 146, 72, 0.15); }
.pill-flight { border-color: rgba(255, 105, 155, 0.68); color: var(--flight); background: rgba(255, 105, 155, 0.16); }
.pill-walk { border-color: rgba(108, 240, 176, 0.65); color: var(--walk); background: rgba(108, 240, 176, 0.15); }
.pill-warn {
  border-color: rgba(255, 88, 82, 0.75);
  background: repeating-linear-gradient(
    -45deg,
    rgba(148, 34, 34, 0.60),
    rgba(148, 34, 34, 0.60) 5px,
    rgba(98, 22, 26, 0.60) 5px,
    rgba(98, 22, 26, 0.60) 10px
  );
  color: #ffe0dc;
}

/* WORKSPACE PANELS (CONTAINED FOR FAST LAYOUT COMPOSITING) */
.desk-panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}

.left-panel, .right-panel {
  pointer-events: auto;
  contain: layout style;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 10px 10px;
  max-height: calc(100vh - 118px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 215, 174, 0.34) transparent;
}
.left-panel::-webkit-scrollbar, .right-panel::-webkit-scrollbar { width: 5px; }
.left-panel::-webkit-scrollbar-track, .right-panel::-webkit-scrollbar-track { background: transparent; }
.left-panel::-webkit-scrollbar-thumb, .right-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 95, 141, 0.55), rgba(248, 190, 90, 0.48), rgba(38, 235, 216, 0.50));
  border-radius: 3px;
}
.left-panel { width: 320px; }
.right-panel { width: 306px; margin-left: auto; }

.left-panel.collapsed, .right-panel.collapsed {
  width: auto;
  max-height: 42px;
  overflow: hidden;
  padding: 6px 10px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px dashed rgba(240, 215, 174, 0.26);
}

.section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aqua);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

/* Weathered banners */
.banner-notice {
  background:
    var(--tex-sand-grain),
    linear-gradient(132deg, rgba(64, 34, 40, 0.78) 0%, rgba(28, 42, 46, 0.86) 60%, rgba(16, 44, 48, 0.88) 100%);
  border: 1px solid rgba(248, 190, 90, 0.38);
  border-left: 3px solid var(--flamingo);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--text);
}
.banner-notice strong { color: var(--sand); letter-spacing: 0.04em; }

.banner-warn {
  background:
    var(--tex-sand-grain),
    linear-gradient(135deg, rgba(92, 30, 34, 0.84), rgba(46, 20, 26, 0.88));
  border: 1px solid rgba(255, 102, 96, 0.56);
  border-left: 3px solid var(--warn);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 11px;
  color: #ffe3de;
}

/* COMPACT 3-STAT SUMMARY STRIP */
.totals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.totals-grid:empty { display: none; }

.metric-cell {
  background:
    var(--tex-sand-grain),
    linear-gradient(160deg, rgba(26, 44, 50, 0.88), rgba(13, 24, 28, 0.92));
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-top-color: rgba(248, 224, 186, 0.36);
  border-radius: 4px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.metric-lbl {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--sand);
  opacity: 0.86;
}
.metric-val {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-bright);
}
.metric-sub {
  font-size: 9.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ITINERARY TIMELINE LIST */
.itinerary-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stop-row, .leg-row {
  background:
    var(--tex-sand-grain),
    linear-gradient(158deg, rgba(23, 41, 46, 0.88), rgba(13, 24, 28, 0.92));
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-top-color: rgba(248, 224, 186, 0.34);
  border-radius: 4px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 110ms ease, background 110ms ease, box-shadow 110ms ease;
}
.stop-row:hover, .leg-row:hover {
  border-color: rgba(38, 235, 216, 0.66);
  background:
    var(--tex-sand-grain),
    linear-gradient(158deg, rgba(28, 52, 58, 0.93), rgba(15, 30, 34, 0.95));
}
.stop-row.selected, .leg-row.selected {
  border-color: var(--flamingo);
  background:
    var(--tex-sand-grain),
    linear-gradient(145deg, rgba(78, 32, 42, 0.90) 0%, rgba(44, 30, 34, 0.92) 55%, rgba(18, 34, 38, 0.94) 100%);
  box-shadow: 0 0 14px rgba(255, 95, 141, 0.26), inset 0 1px 0 rgba(255, 220, 202, 0.30);
}

.leg-row {
  margin-left: 12px;
  border-left: 3px solid var(--drive);
}
.leg-row.mode-bus { border-left-color: var(--bus); }
.leg-row.mode-train { border-left-color: var(--train); }
.leg-row.mode-ferry { border-left-color: var(--ferry); }
.leg-row.mode-flight { border-left-color: var(--flight); }
.leg-row.mode-walk { border-left-color: var(--walk); }
.leg-row.is-stale { border-left-color: var(--warn); }

.row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--text-bright);
  font-size: 12px;
  min-width: 0;
}
.row-title > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stop-badge {
  width: 19px;
  height: 19px;
  border-radius: 3px;
  background: rgba(108, 240, 176, 0.18);
  border: 1px solid rgba(108, 240, 176, 0.65);
  color: var(--walk);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.stop-badge.terminal {
  background: rgba(38, 235, 216, 0.20);
  border-color: rgba(38, 235, 216, 0.72);
  color: var(--ferry);
}
.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-dim);
}

/* Hover-clean row actions */
.stop-row .row-actions {
  display: flex;
  gap: 3px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}
.stop-row:hover .row-actions,
.stop-row.selected .row-actions,
.stop-row:focus-within .row-actions {
  opacity: 1;
  pointer-events: auto;
}

.dwell-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(38, 235, 216, 0.14);
  border: 1px solid rgba(38, 235, 216, 0.42);
  color: #d6fffa;
}
.dwell-chip.bailey {
  background: rgba(248, 190, 90, 0.18);
  border-color: rgba(248, 190, 90, 0.56);
  color: #ffebc2;
}

/* CARDS IN RIGHT INSPECTOR */
.card-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(240, 215, 174, 0.24);
}
.card-block:first-child { border-top: 0; padding-top: 0; }

.readout-box {
  background:
    var(--tex-sand-grain),
    linear-gradient(160deg, rgba(18, 33, 38, 0.92), rgba(11, 21, 25, 0.95));
  border: 1px solid rgba(240, 215, 174, 0.24);
  border-left: 3px solid var(--aqua);
  border-radius: 4px;
  padding: 7px 9px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.readout-box .hi { color: var(--coral-bright); font-weight: 700; letter-spacing: 0.02em; }
.readout-box .dim { color: var(--text-dim); }

/* FORMS */
.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 5px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
  opacity: 0.90;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  background: rgba(11, 22, 26, 0.94);
  border: 1px solid rgba(240, 215, 174, 0.26);
  border-radius: 4px;
  color: var(--text-bright);
  padding: 5px 7px;
  font-family: var(--font-sans);
  font-size: 12px;
}
.field textarea { resize: vertical; min-height: 44px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--flamingo);
  box-shadow: 0 0 0 1px rgba(255, 95, 141, 0.34);
  outline: none;
}

/* ROUTE PLANNER BUILDER & PLACE AUTOCOMPLETE */
.route-builder {
  background:
    var(--tex-sand-grain),
    linear-gradient(150deg, rgba(36, 46, 52, 0.88) 0%, rgba(16, 30, 36, 0.94) 100%);
  border: 1px solid rgba(240, 215, 174, 0.28);
  border-left: 3px solid var(--flamingo);
  border-radius: 4px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.place-wrap {
  position: relative;
}
.place-suggest {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(12, 24, 29, 0.98);
  border: 1px solid var(--aqua);
  border-radius: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.72);
  max-height: 190px;
  overflow-y: auto;
}
.place-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(240, 215, 174, 0.12);
  color: var(--text-bright);
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11.5px;
}
.place-option:last-child { border-bottom: 0; }
.place-option:hover { background: rgba(38, 235, 216, 0.16); }
.place-option small { color: var(--text-dim); font-size: 10px; }

.mode-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.mode-bar .chip {
  justify-content: center;
  padding: 4px 5px;
  font-size: 10.5px;
}
[data-qb-mode="drive"]  { border-bottom: 2px solid var(--drive); }
[data-qb-mode="bus"]    { border-bottom: 2px solid var(--bus); }
[data-qb-mode="train"]  { border-bottom: 2px solid var(--train); }
[data-qb-mode="ferry"]  { border-bottom: 2px solid var(--ferry); }
[data-qb-mode="flight"] { border-bottom: 2px solid var(--flight); }
[data-qb-mode="walk"]   { border-bottom: 2px solid var(--walk); }

/* GASBUDDY & ROADSIDE LEFT DESK TABS & PANES */
.desk-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 5px;
  background: rgba(9, 19, 23, 0.90);
  border: 1px solid rgba(240, 215, 174, 0.24);
}
.desk-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: 3px;
  color: var(--text-dim);
  padding: 5px 3px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  white-space: nowrap;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}
.desk-tab:hover {
  color: var(--text-bright);
  background: rgba(240, 215, 174, 0.08);
}
.desk-tab.active {
  color: #fff8ec;
  background:
    var(--tex-sand-grain),
    linear-gradient(150deg, rgba(255, 95, 141, 0.26) 0%, rgba(248, 190, 90, 0.18) 55%, rgba(38, 235, 216, 0.22) 100%);
  border-color: rgba(240, 215, 174, 0.30);
  border-bottom-color: var(--flamingo);
  box-shadow: inset 0 1px 0 rgba(255, 240, 216, 0.22);
}
.desk-tab[data-desk-tab="gas"].active { border-bottom-color: var(--sunset); }
.desk-tab[data-desk-tab="fuel_calc"].active { border-bottom-color: var(--aqua); }
.desk-tab[data-desk-tab="roadside"].active { border-bottom-color: var(--coral); }

.caa-card {
  background:
    var(--tex-sand-grain),
    linear-gradient(158deg, rgba(22, 39, 44, 0.90), rgba(12, 22, 26, 0.94));
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-left: 3px solid var(--coral);
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.caa-card.is-route-prov {
  border-color: var(--aqua);
  border-left-color: var(--walk);
  box-shadow: 0 0 12px rgba(38, 235, 216, 0.20);
}
.caa-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.caa-prov-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 19px;
  padding: 0 4px;
  border-radius: 3px;
  background: rgba(255, 124, 97, 0.20);
  border: 1px solid rgba(255, 124, 97, 0.62);
  color: var(--coral-bright);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.caa-card.is-route-prov .caa-prov-badge {
  background: rgba(108, 240, 176, 0.20);
  border-color: rgba(108, 240, 176, 0.65);
  color: var(--walk);
}

.desk-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.gas-builder { border-left-color: var(--sunset); }
.calc-builder { border-left-color: var(--aqua); }

.gas-results {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.gas-card {
  background:
    var(--tex-sand-grain),
    linear-gradient(158deg, rgba(22, 39, 44, 0.90), rgba(12, 22, 26, 0.94));
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-left: 3px solid var(--sunset);
  border-radius: 4px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 110ms ease, background 110ms ease;
}
.gas-card:hover { border-color: rgba(38, 235, 216, 0.60); }
.gas-card.cheapest {
  border-left-color: var(--walk);
  box-shadow: inset 0 1px 0 rgba(108, 240, 176, 0.16);
}
.gas-card.selected {
  border-color: var(--flamingo);
  background:
    var(--tex-sand-grain),
    linear-gradient(145deg, rgba(78, 32, 42, 0.90) 0%, rgba(18, 34, 38, 0.94) 100%);
}
.gas-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.gas-card-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gas-card-title {
  color: var(--text-bright);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gas-card-sub {
  color: var(--text-dim);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gas-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 1px;
}
.gas-price-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(9, 19, 23, 0.95);
  border: 1px solid rgba(248, 190, 90, 0.48);
  cursor: pointer;
  flex-shrink: 0;
  color: var(--text-bright);
  transition: border-color 110ms ease;
}
.gas-price-badge:hover { border-color: var(--flamingo); }
.gas-price-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  color: var(--sunset);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.gas-card.cheapest .gas-price-num { color: var(--walk); }
.gas-price-meta {
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.gas-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}
.gas-log-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(240, 215, 174, 0.20);
}
.gas-log-row input {
  width: 78px;
  background: rgba(10, 20, 24, 0.95);
  border: 1px solid rgba(240, 215, 174, 0.34);
  border-radius: 3px;
  color: var(--text-bright);
  padding: 2px 5px;
  font-size: 11px;
}

.fc-hero {
  background:
    var(--tex-sand-grain),
    linear-gradient(148deg, rgba(62, 34, 42, 0.88) 0%, rgba(20, 44, 48, 0.94) 100%);
  border: 1px solid rgba(255, 95, 141, 0.46);
  border-left: 3px solid var(--aqua);
  border-radius: 5px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fc-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.fc-total {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.fc-leg-row {
  background: rgba(12, 23, 27, 0.90);
  border: 1px solid rgba(240, 215, 174, 0.20);
  border-left: 2.5px solid var(--drive);
  border-radius: 4px;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

/* HOTEL & TRANSIT BOOKING CARDS */
.booking-links {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.booking-link {
  text-decoration: none;
  background:
    var(--tex-sand-grain),
    linear-gradient(160deg, rgba(28, 50, 56, 0.92), rgba(14, 28, 33, 0.96));
  border: 1px solid rgba(38, 235, 216, 0.45);
  color: #dcfffb;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.booking-link:hover {
  border-color: var(--flamingo);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 95, 141, 0.28);
}

.hotel-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 170px;
  overflow-y: auto;
}
.hotel-item {
  background: rgba(12, 23, 27, 0.90);
  border: 1px solid rgba(240, 215, 174, 0.22);
  border-left: 2.5px solid var(--sunset);
  border-radius: 4px;
  padding: 5px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.hotel-item-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hotel-item-info strong {
  color: var(--text-bright);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hotel-item-info span {
  color: var(--text-dim);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stay-details {
  border-top: 1px dashed rgba(240, 215, 174, 0.22);
  padding-top: 4px;
}
.stay-details > summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--sand);
  padding: 4px 0;
  user-select: none;
}
.stay-details > summary:hover {
  color: var(--text-bright);
}

.empty-desk {
  background:
    var(--tex-sand-grain),
    linear-gradient(155deg, rgba(24, 42, 48, 0.85), rgba(13, 24, 29, 0.92));
  border: 1px dashed rgba(240, 215, 174, 0.34);
  border-radius: 5px;
  padding: 10px;
  font-size: 11.5px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.empty-desk strong { color: var(--sand); }

/* SLIM SINGLE-ROW BOTTOM GPS AVATAR & PLAYBACK DOCK */
.bottom-dock {
  pointer-events: auto;
  padding: 5px 10px;
  min-height: 36px;
}
.playback-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.gps-avatar-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.gps-vehicle-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 3px;
  border-radius: 4px;
  background: rgba(9, 19, 23, 0.88);
  border: 1px solid rgba(240, 215, 174, 0.24);
}
.gps-veh-btn {
  width: 24px;
  height: 22px;
  padding: 0;
  border-radius: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.gps-veh-btn:hover {
  background: rgba(38, 235, 216, 0.14);
  color: var(--text-bright);
  border-color: rgba(38, 235, 216, 0.35);
}
.gps-veh-btn.active {
  background: linear-gradient(135deg, rgba(38, 235, 216, 0.24), rgba(248, 190, 90, 0.22));
  border-color: var(--aqua);
  color: #fff8ec;
  box-shadow: 0 0 8px rgba(38, 235, 216, 0.32);
}
.gps-veh-btn svg {
  display: block;
  width: 17px;
  height: 17px;
}
.avatar-persona-select {
  max-width: 108px;
  height: 26px;
  padding: 1px 6px;
  font-size: 10.5px;
}
.gps-live-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playback-controls-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 7px;
  border-left: 1px dashed rgba(240, 215, 174, 0.26);
}
#playbackScrubber {
  flex: 1 1 90px;
  min-width: 70px;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--flamingo) 0%, var(--sunset) 48%, var(--aqua) 100%);
  border: 1px solid rgba(248, 224, 186, 0.32);
  cursor: pointer;
}
#playbackScrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--text-bright);
  border: 2px solid var(--flamingo);
  box-shadow: 0 0 8px rgba(255, 95, 141, 0.62);
  cursor: pointer;
}
#playbackScrubber::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--text-bright);
  border: 2px solid var(--flamingo);
  box-shadow: 0 0 8px rgba(255, 95, 141, 0.62);
  cursor: pointer;
}
.playback-status {
  max-width: 205px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* MINIATURE SVG MAP ACTORS (LEG MINIATURES, PLAYBACK VEHICLE & LIVE GPS) */
.map-actor-root {
  position: relative;
  width: 40px;
  height: 40px;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.72));
  z-index: 6;
}
.map-actor-leg {
  width: 30px;
  height: 30px;
  opacity: 0.94;
  z-index: 4;
}
.map-actor-leg:hover,
.map-actor-leg.selected {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 95, 141, 0.9)) drop-shadow(0 2px 5px rgba(0, 0, 0, 0.8));
  z-index: 7;
}
.map-actor-playback {
  width: 42px;
  height: 42px;
  pointer-events: none;
  z-index: 8;
}
.map-actor-gps {
  width: 44px;
  height: 44px;
  z-index: 9;
}
.map-actor-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(38, 235, 216, 0.72);
  background: radial-gradient(circle, rgba(38, 235, 216, 0.24) 0%, rgba(38, 235, 216, 0) 70%);
  pointer-events: none;
  animation: gpsActorPulse 2.2s ease-out infinite;
}
.map-actor-cone {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  pointer-events: none;
  background: conic-gradient(from -24deg at 50% 50%, rgba(38, 235, 216, 0.28) 0deg, rgba(38, 235, 216, 0.04) 48deg, transparent 49deg);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  transition: transform 180ms linear;
}
.map-actor-leg .map-actor-cone {
  display: none;
}
.map-actor-rotator {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-origin: center center;
  transition: transform 180ms linear;
}
.map-actor-sprite {
  display: grid;
  place-items: center;
  line-height: 0;
}
.map-actor-root.is-moving.is-walk .map-actor-rotator {
  animation: miniWalkBob 0.45s ease-in-out infinite alternate;
}
.map-actor-avatar-badge {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #fff8ec;
  background: #0c1c28;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.78);
  pointer-events: none;
}
.map-actor-tag {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%);
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(11, 21, 25, 0.92);
  border: 1px solid rgba(38, 235, 216, 0.62);
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  pointer-events: none;
}
@keyframes gpsActorPulse {
  0%   { transform: scale(0.84); opacity: 0.9; }
  75%  { transform: scale(1.42); opacity: 0.12; }
  100% { transform: scale(1.48); opacity: 0; }
}
@keyframes miniWalkBob {
  0%   { translate: 0 0; }
  100% { translate: 0 -2.5px; }
}
body[data-reduced-motion="true"] .map-actor-pulse,
body[data-reduced-motion="true"] .map-actor-root.is-moving.is-walk .map-actor-rotator {
  animation: none !important;
}
body[data-reduced-motion="true"] .map-actor-rotator,
body[data-reduced-motion="true"] .map-actor-cone {
  transition: none !important;
}

/* MODALS (COMPARE / EXPORT / IMPORT / HELP) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(7, 15, 18, 0.84);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal-card {
  width: min(860px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--glass-strong);
  border-color: rgba(255, 95, 141, 0.68);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 1px dashed rgba(240, 215, 174, 0.28);
}
.modal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--coral-bright);
}
.modal-body {
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.compare-col {
  background:
    var(--tex-sand-grain),
    linear-gradient(160deg, rgba(20, 36, 42, 0.92), rgba(11, 22, 26, 0.96));
  border: 1px solid rgba(240, 215, 174, 0.24);
  border-radius: 5px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.compare-table td {
  padding: 4px 5px;
  border-bottom: 1px solid rgba(240, 215, 174, 0.14);
}
.compare-table td:last-child { text-align: right; color: var(--text-bright); font-weight: 700; }

/* ELEVATION PROFILE & TIDE SVG */
.svg-card {
  background:
    var(--tex-sand-grain),
    rgba(10, 20, 24, 0.94);
  border: 1px solid rgba(240, 215, 174, 0.26);
  border-radius: 4px;
  padding: 5px;
}

/* PRINTABLE TRIP SHEET */
#printSheet { display: none; }

.btn-concierge {
  background: linear-gradient(135deg, rgba(196, 93, 59, 0.92), rgba(248, 190, 90, 0.88));
  border-color: rgba(255, 224, 186, 0.65);
  color: #1d140e;
  font-weight: 700;
}
.btn-concierge:hover {
  filter: brightness(1.08);
}

@media print {
  html, body {
    overflow: visible !important;
    background: #fff !important;
    color: #111 !important;
    height: auto !important;
  }
  body::before { display: none !important; }
  #globeStage, #globeOverlay, .hud-layer, .modal-overlay { display: none !important; }
  #printSheet {
    display: block !important;
    padding: 18px;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #111;
  }
  #printSheet h1 { margin: 0 0 4px; font-size: 20px; }
  #printSheet .print-meta { font-size: 12px; color: #444; margin-bottom: 12px; }
  #printSheet table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11.5px; }
  #printSheet th, #printSheet td { border: 1px solid #bbb; padding: 5px 7px; text-align: left; }
  #printSheet th { background: #f0f3f6; }
}

@media (max-width: 1220px) {
  .hide-narrow { display: none; }
}
@media (max-width: 1040px) {
  .top-bar { flex-wrap: wrap; }
  .left-panel { width: 295px; }
  .right-panel { width: 270px; }
  .playback-bar { flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .compare-grid { grid-template-columns: 1fr; }
  .left-panel, .right-panel { width: 245px; }
  .playback-status { display: none; }
}
