/* The tile map (public/trip-map.js): the trip planner, the day map and the price maps in
   the app, and the server-rendered price map page. Its own file so that page
   can load it without the app's whole stylesheet; it relies only on --font-sans
   and --font-display, which both have. The map stays light in both themes. */
.tpm { position: relative; overflow: hidden; background: #e8eef3; touch-action: none; user-select: none; cursor: grab; color-scheme: light;
  background-image: linear-gradient(rgb(26 11 46 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(26 11 46 / .05) 1px, transparent 1px);
  background-size: 64px 64px; }
.tpm:active { cursor: grabbing; }
.tpm-layer { position: absolute; inset: 0; }
.tpm-tile { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.tpm-lines { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.tpm-pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(26, 11, 46, .4); font: 800 13px/1 var(--font-display); color: #1a0b2e; display: grid; place-items: center; padding: 0;
  cursor: pointer; background: #ffd23f; transition: transform .15s; z-index: 2; }
.tpm-pin.approx { border-style: dashed; }
.tpm-pin.hot { transform: translate(-50%, -50%) scale(1.3); z-index: 5; box-shadow: 0 0 0 4px #fff, 0 0 0 7px #ff4f8b; }
.tpm-pin.start { background: #fff; border-radius: 9px; width: auto; height: 24px; padding: 0 8px; font: 700 12px var(--font-sans); white-space: nowrap;
  transform: translate(-50%, 9px); border-width: 1px; border-color: rgba(26, 11, 46, .16); box-shadow: 0 2px 6px rgba(26, 11, 46, .28); z-index: 1; }
/* A city of the day that is out of the picture: a chip on the edge nearest to it, its arrow pointing there. */
.tpm-pin.start.off { transform: translate(-50%, -50%); display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 14px; background: #1a0b2e; color: #fff; border-color: #fff; z-index: 4; }
.tpm-pin.start.off i { font-style: normal; margin-left: 4px; }
/* The selected place says its name under its number (the list may be out of sight under the sheet). */
.tpm-pin.stop.hot[data-name]::after { content: attr(data-name); position: absolute; top: 100%; left: 50%; transform: translateX(-50%) scale(.77); transform-origin: 50% 0;
  margin-top: 7px; padding: 4px 9px; border-radius: 9px; background: #1a0b2e; color: #fff; font: 700 13px/1.2 var(--font-sans); white-space: nowrap;
  max-width: 210px; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tpm-pin.city { background: #fff; border-radius: 12px; width: auto; height: auto; padding: 5px 10px; font: 800 13px var(--font-display); white-space: nowrap;
  display: flex; gap: 6px; align-items: center; }
.tpm-pin.city small { font: 700 11.5px var(--font-sans); color: #5f506f; }
.tpm-pin.city.hot { background: #ffd23f; transform: translate(-50%, -50%); }
/* The price maps' fares: a name-and-price tag beside the dot, or a bare tap target on a small dot. */
.tpm-pin.fare { width: auto; height: auto; padding: 3px 8px; border: 0; border-radius: 9px; background: #fff; color: #1a0b2e; font: 600 11.5px/1.3 var(--font-sans);
  white-space: nowrap; display: flex; gap: 5px; align-items: baseline; box-shadow: 0 1px 4px rgba(26, 11, 46, .28); }
.tpm-pin.fare b { font-weight: 800; }
/* ▼ a cheap fare, ▲ an expensive one: said without colour too. */
.tpm-pin.fare i { font-style: normal; font-size: 8px; align-self: center; }
.tpm-pin.fare.hot { background: #1a0b2e; color: #fff; box-shadow: 0 0 0 3px #ff4f8b; z-index: 6; }
.tpm-pin.fare.bare { width: 24px; height: 24px; padding: 0; border-radius: 50%; background: transparent; box-shadow: none; }
.tpm-pin.fare.bare.hot { transform: translate(-50%, -50%); background: transparent; box-shadow: none; }
.tpm.tpm-sel .tpm-dot:not(.hot) { opacity: .35; }
.tpm.tpm-sel .tpm-pin.fare:not(.hot):not(.bare) { opacity: .55; }
/* A city's name once placed beside its dot (TripMap._placeLabels): its box is where it is drawn. */
.tpm-pin.placed, .tpm-pin.placed.hot { transform: none; transition: none; }
.tpm-pin:focus-visible { outline: 2px solid #1a0b2e; outline-offset: 3px; }
.tpm-ctl { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; z-index: 6; }
.tpm-ctl button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(26, 11, 46, .14); background: #fff; color: #1a0b2e; padding: 0;
  font: 800 18px/1 var(--font-sans); cursor: pointer; box-shadow: var(--shadow-1, 0 1px 2px rgba(26, 11, 46, .12)); }
.tpm-ctl button:focus-visible { outline: 2px solid #1a0b2e; outline-offset: 2px; }
.tpm-scale { position: absolute; left: 10px; bottom: 8px; z-index: 6; font: 700 11px var(--font-sans); color: #1a0b2e; pointer-events: none; }
.tpm-scale i { display: block; height: 6px; border: 1.5px solid rgba(26, 11, 46, .55); border-top: 0; margin-top: 1px; background: rgb(255 255 255 / .6); }
.tpm-credit { position: absolute; right: 6px; bottom: 4px; z-index: 6; font-size: 10.5px; color: #1a0b2e; background: rgb(255 255 255 / .85); padding: 0 5px;
  border-radius: 4px; text-decoration: none; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
