/* Common Spaces globe (/projects/spaces/map/, places_pages.py and js/globe.js). Loaded on that page only.
   A light band in the site's paper and sand: a sidebar of places beside the globe on wide screens, under it on
   narrow ones. Panels, buttons and
   fields stay square like the rest of the site; round shapes are only the globe, its place markers and the count
   bubbles (DESIGN_SYSTEM.md, rule 8). */

.globe-block {
  --globe-night: #eef1ec;
  --globe-side: var(--panel-sand);
  --globe-glass: rgba(246, 241, 230, .95);
  --globe-edge: var(--line);
  --globe-text: var(--ink);
  --globe-soft: var(--muted);
  --globe-own: #e0a800;
  --globe-associated: var(--leaf);
  --globe-collaborator: #c4622d;
  --globe-on: var(--forest);
  margin: 1.2rem 0 0;
  padding-bottom: var(--space-4);
  background: var(--paper);
  color: var(--globe-text);
}

.u-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.globe-shell { display: grid; grid-template-columns: minmax(min(20rem, 45%), 27rem) minmax(0, 1fr); height: min(86vh, 54rem); min-height: 34rem; border-bottom: 1px solid var(--globe-edge); }

.globe-stage { position: relative; min-width: 0; }

.globe-map { width: 100%; height: 100%; background: var(--globe-night); }

.globe-off .globe-shell { display: block; height: auto; min-height: 0; border: 0; }

.globe-off .globe-side, .globe-off .globe-map, .globe-off .globe-views, .globe-off .globe-info-toggle { display: none; }

.globe-map.maplibregl-map, .globe-map .maplibregl-ctrl button, .globe-pin, .globe-group { font-family: "Source Sans 3", sans-serif; }

/* The sidebar. */
.globe-side { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; background: var(--globe-side); border-right: 1px solid var(--globe-edge); }

.globe-side-head { padding: 1.4rem 1.4rem 1.2rem; border-bottom: 1px solid var(--globe-edge); }

.globe-side .kicker { color: var(--globe-soft); margin-bottom: 0.3rem; }

.globe-side-title { font-size: var(--fs-h2); margin: 0 0 0.3rem; color: var(--globe-text); }

.globe-count { margin: 0 0 1.1rem; font-size: var(--fs-small); color: var(--globe-soft); }

.globe-add {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--globe-text);
  color: var(--globe-text);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  text-decoration: none;
}

.globe-add:hover { background: var(--globe-on); border-color: var(--globe-on); color: var(--cream); }

.globe-label { display: block; margin: 0 0 0.4rem; font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--globe-soft); }

.globe-go { display: flex; margin-bottom: 1rem; }

.globe-city, .globe-find, .globe-kind {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--globe-edge);
  border-radius: 0;
  background: var(--paper);
  color: var(--globe-text);
  font: inherit;
  font-size: var(--fs-small);
}

.globe-city::placeholder, .globe-find::placeholder { color: #6b726c; }

.globe-find { margin-bottom: 1rem; }

.globe-go .globe-city { border-right: 0; }

.globe-city-go { flex: none; min-width: 3.6rem; }

/* appearance: none, or WebKit on iPhone keeps a 27px native select whatever min-height says. */
.globe-kind {
  -webkit-appearance: none;
  appearance: none;
  margin-bottom: 1rem;
  padding-right: 2.2rem;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317211b' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
}

.globe-kind option { background: var(--paper); color: var(--globe-text); }

.globe-side button, .globe-views button, .globe-info-toggle {
  min-height: 2.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--globe-edge);
  border-radius: 0;
  background: transparent;
  color: var(--globe-text);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
}

.globe-side button:hover { border-color: var(--globe-text); }

.globe-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }

.globe-filters button { display: inline-flex; align-items: center; gap: 0.5rem; }

.globe-filters button[aria-pressed="true"], .globe-tour[aria-pressed="true"] { background: var(--globe-on); border-color: var(--globe-on); color: var(--cream); }

.globe-key { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--globe-own); }
.globe-key-associated { background: var(--globe-associated); }
.globe-key-collaborator { background: var(--globe-collaborator); }

.globe-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }

.globe-lucky { grid-column: 1 / -1; letter-spacing: var(--track-eyebrow); text-transform: uppercase; font-size: var(--fs-eyebrow) !important; }

.globe-tour { border-color: var(--globe-on) !important; }

/* Entries. */
.globe-entries { list-style: none; margin: 0; padding: 0; }

.globe-entries[hidden], .globe-entries li[hidden] { display: none; }

.globe-entry {
  display: grid !important;
  gap: 0.3rem;
  width: 100%;
  padding: 1.1rem 1.4rem !important;
  border: 0 !important;
  border-bottom: 1px solid var(--globe-edge) !important;
  text-align: left;
  font-weight: 400 !important;
}

.globe-entry:hover, .globe-entry[aria-current="true"] { background: var(--cream) !important; }

.globe-entry-name { font-family: "Source Serif 4", Georgia, serif; font-size: var(--fs-h3); font-weight: 560; font-variant: small-caps; letter-spacing: 0.02em; line-height: 1.15; }

.globe-entry-name::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin: 0 0.55rem 0.15rem 0; border-radius: 50%; background: var(--globe-own); vertical-align: middle; }
.globe-entry-associated .globe-entry-name::before { background: var(--globe-associated); }
.globe-entry-collaborator .globe-entry-name::before { background: var(--globe-collaborator); }

.globe-entry-kinds { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--globe-soft); }

.globe-entry-where { font-size: var(--fs-small); color: var(--globe-soft); font-variant-numeric: tabular-nums; }

/* The selected place, in the sidebar. */
.globe-detail { padding: 1rem 1.4rem 1.4rem; }

.globe-detail[hidden] { display: none; }

.globe-back { margin-bottom: 1rem; }

.globe-detail img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 0.9rem; }

.globe-detail .kicker { color: var(--clay); }

.globe-detail h3 { font-size: var(--fs-h3); margin: 0 0 0.4rem; color: var(--globe-text); }

.globe-detail h3:focus { outline: none; }

.globe-detail .place-summary { font-size: var(--fs-body); line-height: 1.65; margin: 0 0 0.6rem; }

.globe-detail .place-text .place-meaning, .globe-detail .place-facts dd { color: var(--globe-soft); }

.globe-detail .place-facts { grid-template-columns: 1fr; }

.globe-detail .place-facts div { border-top-color: var(--globe-edge); }

.globe-detail .place-kinds li { border-color: var(--globe-edge); color: var(--globe-text); }

.globe-detail .place-links a { color: var(--clay); }

.globe-detail-share { margin: 1rem 0 0; }

/* Over the globe. */
.globe-info-toggle {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  background: var(--globe-glass);
  border-color: var(--globe-text);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
}

.globe-info {
  position: absolute;
  top: 4.4rem;
  left: 1rem;
  z-index: 3;
  width: min(22rem, calc(100% - 2rem));
  padding: 0.9rem 1rem;
  background: var(--globe-glass);
  border: 1px solid var(--globe-edge);
  font-size: var(--fs-small);
  line-height: 1.55;
}

.globe-info[hidden] { display: none; }

.globe-info p { margin: 0 0 0.6rem; }

.globe-info a { color: var(--globe-text); }

.globe-legend { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.3rem; }

.globe-legend li { display: flex; align-items: center; gap: 0.5rem; }

.globe-readout:empty { display: none; }

.globe-readout {
  position: absolute;
  top: 1rem;
  left: 4.6rem;
  z-index: 2;
  max-width: calc(100% - 10rem);
  margin: 0;
  padding: 0.6rem 0.8rem;
  background: var(--globe-glass);
  border: 1px solid var(--globe-edge);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--globe-soft);
  pointer-events: none;
}

.globe-views { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; display: flex; background: var(--globe-glass); }

.globe-views button + button { border-left: 0; }

.globe-views button[aria-pressed="true"] { background: var(--globe-on); color: var(--cream); }

.globe-status:empty { display: none; }

.globe-status {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 2;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.5rem 0.9rem;
  background: var(--globe-glass);
  border: 1px solid var(--globe-edge);
  font-size: var(--fs-small);
}

.globe-off .globe-status { position: static; transform: none; width: fit-content; margin: 1rem auto 0; }

/* Map controls in the band's colours, with full-size tap targets. */
.globe-map .maplibregl-ctrl-top-right { top: 0.25rem; right: 0.25rem; }
.globe-map .maplibregl-ctrl-group { background: var(--globe-glass); border: 1px solid var(--globe-edge); border-radius: 0; box-shadow: none; }
.globe-map .maplibregl-ctrl-group button { width: 2.75rem; height: 2.75rem; }
.globe-map .maplibregl-ctrl-group button + button { border-top-color: var(--globe-edge); }
.globe-map .maplibregl-cooperative-gesture-screen { font-size: 1rem; }

/* Places: round markers with a small icon, the name beside them when the globe is close. */
.globe-pin {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.globe-pin-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--globe-own);
  color: var(--ink);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1.5px var(--globe-own), 0 0 18px 4px rgba(255, 204, 0, .3);
}

.globe-pin-associated .globe-pin-dot { color: var(--cream); background: var(--globe-associated); box-shadow: 0 0 0 1.5px var(--globe-associated), 0 0 18px 4px rgba(143, 220, 174, .3); }

.globe-pin-collaborator .globe-pin-dot { color: var(--cream); background: var(--globe-collaborator); box-shadow: 0 0 0 1.5px var(--globe-collaborator), 0 0 18px 4px rgba(240, 149, 95, .3); }

.globe-pin-label {
  padding: 0.2rem 0.55rem;
  background: var(--globe-glass);
  border: 1px solid var(--globe-edge);
  color: var(--globe-text);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.globe-pin[aria-pressed="true"] .globe-pin-label { background: var(--globe-on); border-color: var(--globe-on); color: var(--cream); }

.globe-pin[aria-pressed="true"] .globe-pin-dot { outline: 2px solid var(--cream); outline-offset: 3px; }

.globe-far .globe-pin { min-width: 2.75rem; }

.globe-far .globe-pin-label { display: none; }

.globe-far .globe-pin:hover .globe-pin-label, .globe-far .globe-pin:focus-visible .globe-pin-label,
.globe-far .globe-pin[aria-pressed="true"] .globe-pin-label { display: block; }

.globe-group {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: var(--globe-associated);
  color: var(--cream);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--globe-associated), 0 0 18px 4px rgba(143, 220, 174, .3);
}

.globe-group:focus-visible, .globe-pin:focus-visible, .globe-block button:focus-visible, .globe-block select:focus-visible,
.globe-block input:focus-visible, .globe-block summary:focus-visible, .globe-block a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Credits under the band. */
.globe-meta { margin-top: 1rem; font-size: var(--fs-small); color: var(--globe-soft); }

.globe-meta a, .globe-credits a { color: var(--globe-text); }

.globe-credits { margin-top: 0.4rem; font-size: var(--fs-small); color: var(--globe-soft); }

.globe-credits summary { display: inline-flex; align-items: center; min-height: 2.75rem; cursor: pointer; color: var(--globe-text); font-weight: 600; }

.globe-credits dl { margin: 0.4rem 0 0; display: grid; gap: 0.7rem; max-width: 60rem; }

.globe-credits dt { font-weight: 600; color: var(--globe-text); }

.globe-credits dd { margin: 0.15rem 0 0; line-height: 1.55; }

@media (max-width: 899.98px) {
  /* The globe first, then the sidebar at its full height. */
  .globe-shell { display: flex; flex-direction: column-reverse; height: auto; min-height: 0; }
  .globe-stage { height: min(68vh, 34rem); min-height: 20rem; }
  .globe-side { overflow: visible; border-right: 0; border-top: 1px solid var(--globe-edge); }
}

@media (max-width: 639.98px) {
  .globe-readout { display: none; }
  .globe-side-head { padding: 1.2rem var(--gutter); }
  .globe-entry { padding: 1rem var(--gutter) !important; }
  .globe-detail { padding: 1rem var(--gutter) 1.2rem; }
}

/* The places, on the page's own paper. */
.places { padding-top: var(--space-5); }

.places-title { font-size: var(--fs-h2); margin: 0 0 var(--space-3); }

.place-list { list-style: none; margin: 0; padding: 0; }

.place-card {
  display: grid;
  grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line);
}

.place-card[hidden] { display: none; }

.place-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }

.place-index {
  margin: 0 0 0.6rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: var(--fs-h2);
  line-height: 1;
  color: var(--clay);
}

.place-text h3 { font-size: var(--fs-h2); margin: 0 0 0.6rem; }

.place-summary { margin: 0 0 0.8rem; font-size: var(--fs-body); line-height: var(--lh-body); }

.place-meaning { margin: 0 0 1rem; font-style: italic; color: var(--muted); }

.place-facts { margin: 0 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); gap: 0 1.5rem; font-size: var(--fs-small); }

.place-facts div { padding: 0.6rem 0; border-top: 1px solid var(--line); }

.place-facts dt { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: var(--track-eyebrow); text-transform: uppercase; }

.place-facts dd { margin: 0.25rem 0 0; color: var(--muted); line-height: 1.5; }

.place-kinds { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }

.place-kinds li { padding: 0.3rem 0.7rem; border: 1px solid var(--line); font-size: var(--fs-small); }

.place-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0; }

.place-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--clay); font-weight: 600; }

.place-links a[hidden] { display: none; }

/* How a space joins, in the site's sand panel. */
.places-join { margin-top: var(--space-4); padding: var(--space-5) 0; background: var(--panel-sand); color: var(--ink); }

.places-join .kicker { color: var(--clay); }

.places-join h2 { font-size: var(--fs-h2); margin: 0 0 var(--space-3); }

.join-steps { list-style: none; counter-reset: step; margin: 0 0 var(--space-3); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }

.join-steps li { counter-increment: step; padding-top: 1rem; border-top: 1px solid var(--line); }

.join-steps li::before { content: "0" counter(step); display: block; margin-bottom: 0.6rem; font-family: "Source Serif 4", Georgia, serif; font-size: var(--fs-h3); color: var(--clay); }

.join-steps strong { display: block; margin-bottom: 0.35rem; font-size: var(--fs-lead); }

.join-steps span { color: var(--muted); line-height: 1.6; }

.places-join .continue a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--clay); }

@media (max-width: 899.98px) {
  .place-card { grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: var(--space-3); }
}

@media (max-width: 639.98px) {
  .place-card { grid-template-columns: 1fr; padding: var(--space-3) 0; }
  .place-card img { aspect-ratio: 4 / 3; }
  .join-steps { grid-template-columns: 1fr; }
}

/* The stage and its floating controls share the main site's container edges. */
.globe-frame {
  --globe-edge-inset: max(var(--gutter), (100% - var(--wide)) / 2);
  --globe-panel-width: min(380px, 35vw);
  --globe-side: var(--cream);
  --globe-glass: var(--cream);
  margin: 0;
  padding: 0;
  background: var(--forest);
}
.globe-frame:not([hidden], .globe-off), html.globe-capable .globe-frame:not(.globe-off) {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 640px;
  height: calc(100svh - var(--header-height));
}
.globe-frame .globe-shell {
  display: block;
  position: relative;
  min-height: 0;
  height: 100%;
  border: 0;
}
.globe-frame .globe-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  height: auto;
  overflow: clip;
  isolation: isolate;
  background: var(--forest);
}
.globe-frame .globe-map {
  position: absolute;
  inset-block: 0;
  inset-inline: calc(var(--globe-edge-inset) + var(--globe-panel-width) + 24px) var(--globe-edge-inset);
  width: auto;
  background: transparent;
}
.globe-stars, .globe-stars::before, .globe-stars::after {
  position: absolute;
  inset: -16px;
  pointer-events: none;
}
.globe-stars {
  --star-soft: color-mix(in srgb, var(--cream) 23%, transparent);
  --star-bright: color-mix(in srgb, var(--cream) 38%, transparent);
  background: radial-gradient(ellipse at 65% 48%, color-mix(in srgb, var(--cream) 12%, transparent), transparent 47%),
    radial-gradient(ellipse at center, transparent 38%, var(--ink));
}
.globe-stars::before, .globe-stars::after {
  content: "";
  background: radial-gradient(circle at 18px 38px, var(--star-soft) 0 .65px, transparent 1px),
    radial-gradient(circle at 90px 73px, var(--star-bright) 0 .9px, transparent 1.3px);
  background-size: 129px 113px, 211px 173px;
}
.globe-stars::after { background-position: 29px 83px, 7px 17px; background-size: 173px 191px, 297px 241px; opacity: .58; }
.globe-frame[data-night] .globe-stars { --star-soft: color-mix(in srgb, var(--cream) 31%, transparent); --star-bright: color-mix(in srgb, var(--cream) 50%, transparent); }
.globe-frame .globe-side {
  position: absolute;
  z-index: 4;
  inset-block-start: 24px;
  inset-inline-start: var(--globe-edge-inset);
  inline-size: var(--globe-panel-width);
  max-block-size: calc(100% - 48px);
  background: var(--cream);
  border: 1px solid var(--line);
  overflow: hidden;
}
.globe-frame .globe-side-head {
  position: relative;
  flex: none;
  padding: 16px 60px 12px 16px;
}
.globe-frame .globe-side .kicker, .globe-frame .globe-label { color: var(--clay); }
.globe-frame .globe-side-title { margin-bottom: 0; }
.globe-frame .globe-count { margin: 4px 0 0; }
.globe-panel-scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line) var(--cream); overscroll-behavior: contain; }
.globe-frame .globe-panel-toggle { position: absolute; inset: 12px 12px auto auto; inline-size: 44px; padding: 0; border-color: var(--ink); }
.globe-panel-toggle::after {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: rotate(225deg);
}
.globe-frame[data-collapsed] .globe-panel-toggle::after { transform: rotate(45deg); }
.globe-frame[data-collapsed] .globe-panel-scroll { max-block-size: 0; overflow: hidden; }
.globe-panel-section, .globe-panel-find { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.globe-frame .globe-add { background: var(--accent); border-color: var(--accent); font-size: var(--fs-small); text-transform: none; letter-spacing: normal; margin: 0; }
.globe-frame .globe-add:hover { color: var(--ink); background: var(--accent-hover); }
.globe-frame .globe-lucky { font-size: var(--fs-small) !important; text-transform: none; letter-spacing: normal; grid-column: auto; }
.globe-frame .globe-actions, .globe-frame .globe-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.globe-frame .globe-actions button, .globe-frame .globe-filters button { padding: 5px; justify-content: center; }
.globe-frame .globe-filters button { gap: 4px; }
.globe-frame .globe-side button:not(.globe-entry, .globe-clear) { border-color: var(--ink); }
.globe-frame .globe-key { flex: none; }
.globe-frame :is(.globe-city,.globe-find,.globe-kind) { min-height: 48px; }
.globe-frame .globe-go, .globe-frame .globe-find { margin: 0; }
.globe-frame :is(.globe-city,.globe-find)::placeholder { color: var(--muted); }
.globe-frame .globe-entry-name { font-variant: normal; letter-spacing: normal; }
.globe-frame .globe-entry:is(:hover,:focus-visible) { background: var(--paper) !important; }
.globe-frame .globe-map .maplibregl-ctrl-top-right { inset: 24px 0 auto auto; }
.globe-frame .globe-map .maplibregl-ctrl-group {
  margin: 0;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none !important;
}
.globe-frame .maplibregl-ctrl-group .globe-info-toggle { position: static; }
.globe-frame .globe-info { z-index: 6; inset: 24px calc(var(--globe-edge-inset) + 54px) auto auto; }
.globe-frame .globe-views { inset: auto var(--globe-edge-inset) 24px auto; }
.globe-frame .globe-readout { inset: 24px auto auto calc(var(--globe-edge-inset) + var(--globe-panel-width) + 24px); }
.globe-frame .globe-status { inset-block-end: 24px; }
.globe-attribution {
  z-index: 5;
  background: var(--forest);
  color: var(--cream);
  border-top: 1px solid color-mix(in srgb,var(--cream) 28%,transparent);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.globe-attribution .globe-meta { margin-block: 0; color: inherit; }
.globe-attribution .globe-meta a { color: inherit; text-decoration: underline; }
.globe-frame.globe-off { min-height: 0; height: auto; }
.globe-frame.globe-off .globe-stage { position: relative; }
.globe-frame.globe-off .globe-stars { display: none; }

@media (max-width: 899.98px) {
  /* The peek is as tall as its content: js/globe.js measures the head and the search field into --globe-peek-content
     (170px until it has), and the safe area under it keeps the field clear of the home indicator. */
  .globe-frame { --globe-sheet: 70%; --globe-peek: calc(var(--globe-peek-content, 163px) + env(safe-area-inset-bottom)); }
  /* The stage fits the screen it is on: the 640px floor on the desktop frame pushed the sheet below the fold on short phones and in landscape */
  .globe-frame:not([hidden], .globe-off), html.globe-capable .globe-frame:not(.globe-off) { min-height: 0; height: max(18rem, calc(100svh - var(--header-height) - 2rem)); }
  /* In the peek the head is the title alone and the search keeps its label for screen readers only */
  .globe-frame[data-collapsed] .globe-count { display: none; }
  .globe-frame[data-collapsed] .globe-panel-find { padding-block: 8px 12px; }
  .globe-frame[data-collapsed] .globe-panel-find .globe-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .globe-frame .globe-map { inset-inline: 0; inset-block-end: 96px; }
  .globe-frame .globe-map .maplibregl-ctrl-top-right { inset-inline-end: var(--globe-edge-inset); }
  .globe-frame .globe-side {
    inset: auto var(--globe-edge-inset) 0;
    inline-size: auto;
    height: var(--globe-sheet);
    max-block-size: none;
  }
  .globe-frame[data-collapsed] .globe-side { height: var(--globe-peek); }
  .globe-frame[data-collapsed] .globe-panel-scroll { max-block-size: none; }
  .globe-frame[data-collapsed] :is(.globe-panel-section,.globe-entries,.globe-detail) { display: none; }
  .globe-frame .globe-panel-toggle { touch-action: none; }
  .globe-frame .globe-views { inset-block: 24px auto; inset-inline-end: calc(var(--globe-edge-inset) + 53px); }
  .globe-frame .globe-info { inset-block-start: 76px; }
  .globe-frame .globe-readout { display: none; }
  .globe-frame .globe-status { inset-block-end: calc(var(--globe-peek) + 8px); }
  .globe-frame:not([data-collapsed]) .globe-status { inset-block-end: calc(var(--globe-sheet) + 8px); }
}
@media (prefers-reduced-motion: no-preference) {
  .globe-frame .globe-side { transition: height 220ms ease-out; }
  .globe-frame .globe-side button { transition: background-color 150ms, color 150ms, border-color 150ms; }
  .globe-frame .globe-panel-section { animation: globe-panel-in 220ms ease-out both; }
  .globe-frame .globe-panel-section:nth-child(3) { animation-delay: 40ms; }
  .globe-frame .globe-panel-section:nth-child(4) { animation-delay: 80ms; }
  .globe-stars::before { animation: globe-star-drift 48s ease-in-out infinite alternate; }
  .globe-stars::after { animation: globe-star-twinkle 24s ease-in-out infinite alternate; }
  .globe-frame:not([data-stars-active]) .globe-stars::before,
  .globe-frame:not([data-stars-active]) .globe-stars::after { animation-play-state: paused; }
}
@keyframes globe-panel-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes globe-star-drift { to { transform: translate(11px, -9px); } }
@keyframes globe-star-twinkle { to { opacity: .86; transform: translate(-8px, 10px); } }
.globe-row-highlight:is(.globe-group), .globe-row-highlight .globe-pin-dot {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}
.globe-preview {
  display: inline-block;
  margin-inline-start: .55rem;
  padding: 2px 5px;
  border: 1px solid var(--line);
  color: var(--clay);
  text-transform: none;
  letter-spacing: normal;
}

@media (min-width: 900px) {
  .globe-frame .globe-panel-scroll { max-block-size: 1000px; }
}
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .globe-frame .globe-panel-scroll { transition: max-block-size 240ms ease-out; }
}
@media (max-width: 899.98px) {
  .globe-frame .globe-side-head { padding-block-start: 16px; }
  .globe-frame .globe-panel-toggle::before {
    content: "";
    display: block;
    inline-size: 16px;
    block-size: 2px;
    margin: 0 auto 5px;
    background: currentColor;
  }
}
.globe-frame:has(#community-map-data) .globe-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
.globe-key-listing, .globe-entry-listing .globe-entry-name::before { background: var(--clay); border: 1px solid var(--cream); }
.globe-practice { border: 0; min-inline-size: 0; margin: 0 0 16px; padding: 0; }
.globe-practice-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.globe-frame .globe-practice button { padding-inline: 7px; text-align: start; }
.globe-frame .globe-practice button:disabled { color: var(--muted); border-color: var(--line); cursor: default; }
.globe-frame .globe-practice button[aria-pressed="true"] { background: var(--forest); color: var(--cream); }
.globe-browse { padding: 12px 16px; }
.globe-results { margin: 0; font-size: var(--fs-small); }
.globe-frame .globe-browse button { margin-block-start: 6px; }
.globe-frame .globe-clear { text-decoration: underline; border: 0; padding-inline: 0; }
.globe-frame .globe-browse [hidden] { display: none; }
.globe-frame:has(.globe-detail:not([hidden])) .globe-browse { display: none; }
@media (max-width: 899.98px) {
  .globe-frame[data-collapsed] .globe-browse { display: none; }
}

/* Short landscape phones: the sheet becomes the desktop side panel, so the stage keeps its height and the panel stays on screen */
@media (max-width: 899.98px) and (orientation: landscape) and (max-height: 520px) {
  .globe-frame { --globe-panel-width: min(340px, 44vw); }
  .globe-frame .globe-map { inset-inline: calc(var(--globe-edge-inset) + var(--globe-panel-width) + 16px) var(--globe-edge-inset); inset-block-end: 0; }
  /* the map already stops at the edge inset, so its controls sit flush to it (the phone rule adds the inset a second time) */
  .globe-frame .globe-map .maplibregl-ctrl-top-right { inset-inline-end: 0; }
  /* 32px from the top keeps the panel clear of the announcement pill, which sits under the top bar */
  .globe-frame .globe-side { inset: 32px auto 8px var(--globe-edge-inset); inline-size: var(--globe-panel-width); height: auto; max-block-size: calc(100% - 40px); }
  .globe-frame .globe-panel-scroll { flex: 1 1 auto; min-block-size: 0; }
  .globe-frame .globe-side-head { padding: 8px 60px 6px 16px; }
  .globe-frame .globe-count { display: none; }
  .globe-frame .globe-panel-find { padding-block: 8px; }
  .globe-frame .globe-status, .globe-frame:not([data-collapsed]) .globe-status { inset-block-end: 8px; }
}

/* The note under "The places" is for a browser that cannot show the globe; with the globe on it stays out of the way. */
html.globe-capable .globe-fallback-note { display: none; }

/* Before js/globe.js starts, a phone's sheet is already its peek (the inline script in places_pages.py sets html.globe-peek), so it
   does not jump from open to peek when the script runs. After it starts, [data-collapsed] takes over. */
@media (max-width: 899.98px) {
  html.globe-peek:not(.globe-started) .globe-frame .globe-side { height: var(--globe-peek); }
  html.globe-peek:not(.globe-started) .globe-frame :is(.globe-panel-section, .globe-entries, .globe-detail, .globe-count) { display: none; }
}
