/* Find Bad Weather, alternative interface (v2).
   A full-screen map with floating translucent panels, set in PP Monument like the main site.
   Shape rule: panels 24px, controls 12px, anything pill-like is fully round.
   Layers, bottom to top: map, credits and zoom, panels, top controls, pop-up list, banner. */

/* PP Monument: Normal Regular for all text, Wide Black for airport codes. */
@font-face {
  font-family: "PP Monument";
  src: url("font/PPMonumentNormal-Regular.woff2") format("woff2"),
       url("font/PPMonumentNormal-Regular.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "PP Monument Wide";
  src: url("font/PPMonumentWide-Black.woff2") format("woff2"),
       url("font/PPMonumentWide-Black.woff") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

:root {
  /* Dark theme (default). One neutral highlight; the only colours are the severity colours. */
  --map: #101114;
  --surface: rgba(28, 28, 30, 0.72);
  --surface-solid: #1c1c1e;
  --fill: rgba(120, 120, 128, 0.26);
  --fill-soft: rgba(120, 120, 128, 0.16);
  --thumb: rgba(110, 110, 116, 0.9);
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, 0.64);
  --text-3: rgba(235, 235, 245, 0.34);
  --line: rgba(255, 255, 255, 0.09);
  --edge-light: rgba(255, 255, 255, 0.07);
  --accent: #f5f5f7;
  --on-accent: #1c1c1e;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
  --blur: blur(28px) saturate(180%);
  --storm: #ffd60a;

  --inset: 16px;
  --control: 40px;
  --top: calc(var(--inset) + env(safe-area-inset-top));
  --panel-top: calc(var(--top) + var(--control) + 12px);
  --panel-width: 380px;
  --r-panel: 24px;
  --r-control: 12px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --map: #e4e6ea;
  --surface: rgba(250, 250, 252, 0.78);
  --surface-solid: #ffffff;
  --fill: rgba(120, 120, 128, 0.2);
  --fill-soft: rgba(120, 120, 128, 0.12);
  --thumb: #ffffff;
  --text: #1c1c1e;
  --text-2: rgba(60, 60, 67, 0.72);
  --text-3: rgba(60, 60, 67, 0.36);
  --line: rgba(0, 0, 0, 0.08);
  --edge-light: rgba(255, 255, 255, 0.6);
  --accent: #1c1c1e;
  --on-accent: #ffffff;
  --shadow: 0 12px 40px rgba(20, 24, 40, 0.16);
  --storm: #e08a00;
  color-scheme: light;
}

/* For people who ask their device for less transparency or more contrast: solid panels. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root {
    --surface: var(--surface-solid);
    --blur: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.4);
    --text-2: #d8d8de;
  }

  :root[data-theme="light"] {
    --line: rgba(0, 0, 0, 0.5);
    --text-2: #2c2c2e;
  }
}

@media (max-width: 1180px) {
  :root {
    --panel-width: 340px;
  }
}

@media (max-width: 900px) {
  :root {
    --panel-width: 300px;
  }
}

@media (pointer: coarse) {
  :root {
    --control: 44px;
  }
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--map);
  color: var(--text);
  font-family: "PP Monument", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

[hidden] {
  display: none !important;
}

button,
select,
input {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

#map {
  position: absolute;
  inset: 0;
  background: var(--map);
}

/* The translucent material shared by every floating surface. */
.card,
.brand,
#layer-toggle,
#layerbar,
.leaflet-container .leaflet-control-zoom {
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-light);
}

/* Press feedback: every control answers the moment it is touched. */
.airport,
.route,
.tab,
.pill,
.layer,
#layer-toggle,
#filter-toggle {
  transition: transform 0.12s ease-out, background-color 0.12s ease-out;
}

.tab:active,
.pill:active,
#layer-toggle:active,
#filter-toggle:active {
  transform: scale(0.96);
}

.airport:active,
.route:active {
  transform: scale(0.985);
}

/* Top row: brand on the left, layers on the right. */

/* Logo placeholder: a pill in the top left corner. */
.brand {
  position: absolute;
  top: var(--top);
  left: calc(var(--inset) + env(safe-area-inset-left));
  z-index: 1150;
  display: flex;
  align-items: center;
  height: var(--control);
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-2);
  pointer-events: none;
}

#layer-toggle {
  position: absolute;
  top: var(--top);
  right: calc(var(--inset) + env(safe-area-inset-right));
  z-index: 1150;
  display: grid;
  place-items: center;
  width: var(--control);
  height: var(--control);
  padding: 0;
  border-radius: var(--r-control);
  cursor: pointer;
}

#layer-toggle svg,
#filter-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.open #layer-toggle {
  background: var(--accent);
  color: var(--on-accent);
}

/* Layer list: opens under its button and grows out of it. */

#layerbar {
  position: absolute;
  top: calc(var(--top) + var(--control) + 8px);
  right: calc(var(--inset) + env(safe-area-inset-right));
  z-index: 1200;
  display: flex;
  flex-direction: column;
  width: min(272px, calc(100vw - 2 * var(--inset)));
  max-height: calc(100dvh - var(--panel-top) - var(--inset));
  overflow-y: auto;
  padding: 6px;
  border-radius: 20px;
  font-size: 0.9375rem;
  transform-origin: top right;
  transform: scale(0.92);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.18s ease-out, visibility 0s 0.18s;
}

.open #layerbar {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

#layers {
  display: contents;
}

/* A row: name on the left, switch on the right. */
.layer,
.bar-item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px 0 12px;
  border-radius: var(--r-control);
  user-select: none;
}

.layer {
  cursor: pointer;
}

@media (hover: hover) {
  .layer:hover {
    background: var(--fill-soft);
  }
}

.layer.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* The switch itself. */
.layer input {
  appearance: none;
  position: relative;
  flex: none;
  width: 42px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(--fill);
  cursor: inherit;
  transition: background-color 0.18s ease-out;
}

.layer input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.18s ease-out;
}

.layer input:checked {
  background: var(--accent);
}

.layer input:checked::after {
  transform: translateX(16px);
  background: var(--on-accent);
}

.bar-opacity {
  flex-direction: row;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--text-2);
}

.bar-opacity input {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}

/* Panels */

.card {
  position: absolute;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-panel);
  overflow: hidden;
}

.card-head {
  display: none;
}

.grabber {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: var(--text-3);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 14px 14px 0;
}

#ranking {
  top: var(--panel-top);
  bottom: var(--inset);
  left: calc(var(--inset) + env(safe-area-inset-left));
  width: var(--panel-width);
}

#detail {
  top: var(--panel-top);
  right: calc(var(--inset) + env(safe-area-inset-right));
  width: var(--panel-width);
  max-height: calc(100% - var(--panel-top) - var(--inset) - 96px);
  padding: 18px 0 14px;
}

#detail-view {
  min-height: 0;
  padding: 0 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.scroll-list,
#detail-view,
#layerbar {
  scrollbar-width: thin;
  scrollbar-color: var(--text-3) transparent;
}

/* Search */

.search {
  position: relative;
  flex: none;
  margin-bottom: 12px;
}

#airport-search {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-control);
  background: var(--fill-soft);
  font-size: 0.875rem;
  color: var(--text);
}

/* Touch devices: below 16px, iPhones zoom the whole page when the field is tapped. */
@media (pointer: coarse) {
  #airport-search {
    font-size: 1rem;
  }
}

#airport-search::placeholder {
  color: var(--text-2);
}

#airport-search::-webkit-search-cancel-button {
  display: none;
}

/* Ranking / Route switch with the filter button beside it. */

.tabs-row {
  --row: 36px;
  display: flex;
  flex: none;
  gap: 8px;
  height: var(--row);
  margin-bottom: 12px;
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill-soft);
}

/* The selected segment is one thumb that slides between the two labels. */
.tabs::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 8px;
  background: var(--thumb);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tabs:has([data-tab="route"][aria-selected="true"])::before {
  transform: translateX(100%);
}

.tab {
  position: relative;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}

.tab[aria-selected="true"] {
  color: var(--text);
}

#filter-toggle {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--row);
  height: var(--row);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--fill-soft);
  color: var(--text-2);
  cursor: pointer;
}

#filter-toggle[aria-expanded="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

/* A dot on the button while a sort or filter is switched on. */
#filter-toggle.has-filters:not([aria-expanded="true"])::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

#filter-panel {
  flex: none;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 16px;
  background: var(--fill-soft);
}

.filter-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

.filter-title:not(:first-child) {
  margin-top: 4px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-soft);
  font-size: 0.8125rem;
  color: var(--text);
  cursor: pointer;
}

.pill[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.filters {
  display: grid;
  gap: 6px;
  padding: 0 2px 10px;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.filters label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.filters output {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.filters input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
}

#main-view,
.tab-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.searching .tabs-row,
.searching #filter-panel,
.searching .tab-panel {
  display: none;
}

/* Lists */

.scroll-list {
  flex: 1;
  min-height: 0;
  margin: 0 -14px;
  padding: 0 8px 12px;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.scroll-list .empty {
  padding: 18px 8px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-2);
}

/* An airport row: severity dot leading, then code, place and reasons in one column. */
.airport {
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 10px;
  row-gap: 2px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
}

@media (hover: hover) {
  .airport:hover,
  .route:hover {
    background: var(--fill-soft);
  }
}

.airport.selected,
.route.active {
  background: var(--fill-soft);
}

.airport:focus-visible,
.route:focus-visible {
  outline-offset: -2px;
}

.airport .score {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
}

.code,
#detail-view h2 {
  font-family: "PP Monument Wide", "PP Monument", system-ui, sans-serif;
}

.code {
  grid-column: 2;
  font-size: 1rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.where {
  grid-column: 2;
  min-width: 0;
  font-size: 0.8125rem;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reasons {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

/* A reason: a soft capsule tinted by how heavily it weighs (--chip is its severity colour). */
.chip {
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip, var(--text-3)) 17%, transparent);
  font-size: 0.75rem;
  line-height: 1.45;
  color: color-mix(in srgb, var(--chip, var(--text)) 42%, var(--text));
  white-space: nowrap;
}

/* Difficulty dot; the worst level sends out a slow ring. */
.score {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dot);
}

.score-extreme::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--dot);
  animation: score-pulse 3.2s ease-out infinite;
}

/* A soft ring that stays close to the dot, then rests for half of each cycle. */
@keyframes score-pulse {
  0% { transform: scale(1); opacity: 0.32; }
  50%, 100% { transform: scale(1.8); opacity: 0; }
}

/* A route: two airports joined by a dotted line, with the distance underneath. */
.route {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 14px;
  background: none;
  text-align: left;
  cursor: pointer;
}

/* Routes are separated by a hairline, with room above and below so the grey selection box
   never touches it. */
#route-list > li {
  padding: 6px 0;
}

#route-list > li + li {
  border-top: 1px solid var(--line);
}

.route-end {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
}

/* The severity dot marks each end of the route, as in the ranking. "From" and "To" stay
   available to screen readers only. */
.route-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.route .score {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
}

/* A selected route is shown on the map as two ringed airports, without a line between them. */
.leaflet-route-pane {
  display: none;
}

.route-distance {
  padding-left: 24px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Airport details */

/* Code with name and city underneath; the details show no severity dot. */
.detail-head .score {
  display: none;
}

#detail-view h2 {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.note {
  margin: 4px 0 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-2);
  text-wrap: balance;
}

#detail-view h3 {
  margin: 22px 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-2);
}

#detail-view .reasons {
  gap: 6px;
  margin-top: 0;
}

#detail-view .chip {
  padding: 4px 11px;
  font-size: 0.8125rem;
}

/* Facts sit in one grouped block with hairlines between the rows. */
.facts {
  display: grid;
  grid-template-columns: 112px 1fr;
  margin: 0;
  padding: 2px 14px;
  border-radius: 14px;
  background: var(--fill-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}

.facts dt,
.facts dd {
  margin: 0;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--text-2);
}

.facts dt:first-of-type,
.facts dt:first-of-type + dd {
  border-top: 0;
}

.forecast-when {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.raw-label {
  margin: 10px 0 4px;
  font-size: 0.75rem;
  color: var(--text-2);
}

.raw {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-control);
  background: var(--fill-soft);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Credits: one quiet line on the map, beside the zoom buttons. */

.credits {
  position: absolute;
  right: calc(var(--inset) + 56px + env(safe-area-inset-right));
  bottom: calc(var(--inset) + 2px);
  z-index: 1000;
  margin: 0;
  font-size: 0.6563rem;
  color: var(--text-2);
  text-shadow: 0 0 4px var(--map), 0 0 4px var(--map);
}

.credits a {
  color: inherit;
  text-decoration: none;
}

.credits a:hover {
  text-decoration: underline;
}

/* The copy of the credits inside the list sheet is for phones only. */
.sheet-credits {
  display: none;
}

/* Banner for problems, under the top row. */

#banner {
  position: absolute;
  top: var(--panel-top);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  width: max-content;
  max-width: min(480px, calc(100% - 2 * var(--inset)));
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  background: #b3382c;
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}

#banner code {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

/* Map controls and markers */

.leaflet-container {
  font-family: inherit;
}

.leaflet-container .leaflet-control-zoom {
  margin: 0 var(--inset) var(--inset) 0;
  border-radius: var(--r-control);
  overflow: hidden;
}

.leaflet-container .leaflet-control-zoom a {
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--text);
  font: 400 20px/40px system-ui, sans-serif;
}

.leaflet-container .leaflet-control-zoom a + a {
  border-top: 1px solid var(--line);
}

.leaflet-container .leaflet-control-zoom a.leaflet-disabled {
  background: none;
  color: var(--text-3);
}

.storm-flash span {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.storm-flash span::before,
.storm-flash span::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  animation: 2.6s infinite var(--delay, 0s);
}

.storm-flash span::before {
  inset: 9px;
  background: var(--storm);
  box-shadow: 0 0 10px 3px var(--storm);
  animation-name: storm-flicker;
}

.storm-flash span::after {
  inset: 0;
  border: 2px solid var(--storm);
  animation-name: storm-ring;
  animation-timing-function: ease-out;
}

@keyframes storm-flicker {
  0%, 9%, 100% { opacity: 0.45; }
  3%, 12% { opacity: 1; }
  6% { opacity: 0.3; }
  30% { opacity: 0.6; }
}

@keyframes storm-ring {
  0% { transform: scale(0.3); opacity: 0.9; }
  45%, 100% { transform: scale(1.5); opacity: 0; }
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface-solid);
  color: var(--text);
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
}

.leaflet-popup-content {
  margin: 12px 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .airport:active,
  .route:active,
  .tab:active,
  .pill:active,
  #layer-toggle:active,
  #filter-toggle:active {
    transform: none;
  }
}

/* Phones: the list is a bottom sheet that rests with its search field showing. */

@media (max-width: 640px) {
  :root {
    --inset: 12px;
    /* How much of the sheet's content stays visible when it rests: the search field (6px gap +
       44px field) plus the same space below it as there is above it up to the sheet's top edge
       (28px). On phones with a home bar the space below is at least that bar's reserved area. */
    --peek: calc(51px + max(28px, env(safe-area-inset-bottom)));
  }

  .card-head {
    flex: none;
    display: grid;
    place-items: center;
    width: 100%;
    height: 22px;
    padding: 4px 0 0;
    border: 0;
    background: none;
    touch-action: none;
    cursor: grab;
  }

  #ranking,
  #detail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    border-radius: 28px 28px 0 0;
    border-width: 1px 0 0;
  }

  /* The bottom padding is what the sheet leaves showing when it rests; the content reaches
     back into it, so nothing is lost when the sheet is open. */
  #ranking {
    height: 74dvh;
    padding-bottom: var(--peek);
  }

  #ranking .card-body {
    margin-bottom: calc(-1 * var(--peek));
    padding: 6px 14px env(safe-area-inset-bottom);
  }

  /* At rest only the search field shows; the rest fades in when the sheet opens. */
  #ranking .card-body > * {
    transition: opacity 0.2s ease-out;
  }

  #ranking .card-body[inert] > :not(.search) {
    opacity: 0;
  }

  #detail {
    z-index: 1160;
    max-height: 74dvh;
    padding: 0 0 calc(14px + env(safe-area-inset-bottom));
  }

  /* Two translucent sheets must not show through each other. */
  #ranking {
    transition: opacity 0.2s ease;
  }

  .detail-open #ranking {
    opacity: 0;
    pointer-events: none;
  }

  /* The filter choices sit in rows that scroll sideways, so the panel stays short. */
  #filter-panel .pills {
    flex-wrap: nowrap;
    margin: 0 -12px;
    padding: 0 12px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pill {
    min-height: 36px;
    padding: 0 14px;
  }

  .tabs-row {
    --row: 40px;
  }

  .leaflet-control-zoom {
    display: none;
  }

  /* The credits move off the map into the foot of the list sheet. */
  .credits {
    display: none;
  }

  .sheet-credits {
    position: static;
    display: block;
    flex: none;
    padding: 8px 0 10px;
    text-align: center;
    text-shadow: none;
  }
}
