:root {
  color-scheme: light;
  --bg: #f9f9f7;
  --surface: #ffffff;
  --ink: #1f1f1d;
  --muted: #6a6a66;
  --accent: #ef6c00;
  --accent-soft: rgba(239, 108, 0, 0.12);
  --border: #e2e1dd;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  --header-height: 3.5rem;
  --sidebar-list-max-height: min(22rem, 42dvh);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

body.dashboard-active {
  overflow: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0.45rem 1.25rem 0.45rem 0.625rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
  background: rgba(249, 249, 247, 0.9);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
}

.site-header .brand h1 {
  font-size: 1.15rem;
  line-height: 1.05;
}

.tagline {
  margin: 0.16rem 0 0;
  letter-spacing: 0.015em;
  font-size: 0.62rem;
  font-style: italic;
  line-height: 1.1;
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  padding: 0.15rem 0.3rem 0.15rem 0.15rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
}

.account-menu-trigger:hover,
.account-menu-trigger[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--border);
}

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

.account-avatar,
.account-avatar-fallback {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  flex: 0 0 auto;
}

.account-avatar {
  object-fit: cover;
  background: #ecebe7;
}

.account-avatar-fallback {
  display: grid;
  place-items: center;
  background: #162f52;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.account-menu-chevron {
  color: var(--muted);
  font-size: 0.75rem;
  transition: transform 120ms ease;
}

.account-menu-trigger[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu-popover {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 30;
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
}

.account-menu-identity {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.55rem 0.65rem;
  overflow: hidden;
}

.account-menu-identity strong,
.account-menu-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.account-menu-popover button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  width: 100%;
  padding: 0.62rem 0.65rem;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.account-menu-popover button:hover:not(:disabled),
.account-menu-popover button:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  outline: none;
}

.account-menu-popover .menu-item-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.account-menu-popover .danger-menu-item {
  color: #b3261e;
}

main {
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--header-height));
  min-height: 0;
  margin: 0;
  padding: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

#loading-panel,
#login-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(36rem, calc(100% - 2rem));
  margin: 0;
  transform: translate(-50%, -50%);
}

#loading-panel {
  z-index: 8;
  width: min(30rem, calc(100% - 2rem));
  padding: 1.15rem 1.25rem;
  border-color: rgba(239, 108, 0, 0.24);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 18px 55px rgba(44, 32, 17, 0.18);
  backdrop-filter: blur(16px) saturate(1.15);
}

.loading-kicker {
  display: block;
  margin-bottom: 0.48rem;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.loading-quote {
  margin: 0;
}

.loading-quote p {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 550;
  line-height: 1.42;
}

.loading-progress {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.loading-spinner {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border: 2px solid rgba(239, 108, 0, 0.24);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

body.loading-active .stats-card,
body.loading-active .status-bar {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
    border-color: var(--accent);
  }
}

.control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.control select {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0.4rem 0.75rem;
  font-size: 1rem;
  background: var(--surface);
  width: 100%;
  min-width: 0;
}

button {
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
  font-weight: 500;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(239, 108, 0, 0.25);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
}

.ghost-button:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.08);
}

.status-bar {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 7;
  width: min(42rem, calc(100% - 14rem));
  margin: 0;
  transform: translateX(-50%);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 108, 0, 0.35);
  font-size: 0.95rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
}

.dashboard-view,
.viz-layout {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.map-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  position: relative;
  z-index: 0;
  background: #dce8ea;
}

.stats-card {
  position: absolute;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 6;
  width: min(22rem, calc(100% - 2rem));
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 18px 50px rgba(30, 38, 45, 0.18);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, opacity 180ms ease, visibility 180ms ease;
}

.sidebar-scroll-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
  margin-right: -0.25rem;
  scrollbar-gutter: stable;
}

.sidebar-tabs {
  display: none;
}

.sidebar-tab-panel {
  display: contents;
}

.mobile-activity-empty {
  display: none;
}

.sidebar-section {
  padding: 0.65rem 0;
}

.sidebar-section h3 {
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

.exploration-settings {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sidebar-control-button {
  width: 100%;
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  border: 1px solid #cf5e00;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  text-align: center;
  box-shadow: 0 8px 18px rgba(239, 108, 0, 0.22);
}

.sidebar-control-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(239, 108, 0, 0.28);
}

.sidebar-control-button:focus-visible {
  outline: 3px solid rgba(239, 108, 0, 0.25);
  outline-offset: 2px;
}

.type-toggle-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: -0.2rem;
}

.type-toggle-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.type-toggle-head h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.activity-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.activity-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
  width: auto;
}

.activity-toggle .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.activity-toggle[data-active="true"] {
  border-color: rgba(239, 108, 0, 0.4);
  background: rgba(239, 108, 0, 0.08);
  color: var(--accent);
  font-weight: 600;
}

.activity-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.activity-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-dialog.hidden {
  display: none;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.dialog-card {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  width: min(460px, calc(100% - 2rem));
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1;
}

.dialog-header h3 {
  margin-bottom: 0.35rem;
}

.activity-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.activity-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.activity-option input {
  accent-color: var(--accent);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dialog-actions button {
  width: auto;
}

.top-cells-section,
.cell-detail,
.metrics {
  flex: 0 0 auto;
}

.exploration-grid-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.sidebar-section .exploration-grid-heading h3 {
  margin-bottom: 0;
}

.grid-sort-control {
  flex: 0 1 auto;
  min-width: 0;
}

.grid-sort-control select {
  width: auto;
  max-width: 100%;
  padding: 0.42rem 1.8rem 0.42rem 0.55rem;
  border-radius: 8px;
  font-size: 0.74rem;
}

.exploration-grid-list {
  max-height: var(--sidebar-list-max-height);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.3rem;
  scrollbar-gutter: stable;
}

.hash-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  contain: content;
}

.hash-list li {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
}

.grid-cell-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.58rem 0.7rem;
  border: 1px solid transparent;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 400;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.grid-cell-copy {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  min-width: 0;
}

.grid-cell-button:hover,
.grid-cell-button:focus-visible {
  background: rgba(239, 108, 0, 0.12);
  border-color: rgba(239, 108, 0, 0.3);
  outline: none;
}

.hash-list li.selected .grid-cell-button {
  border-color: rgba(239, 108, 0, 0.5);
  box-shadow: 0 0 0 1px rgba(239, 108, 0, 0.12);
  background: rgba(239, 108, 0, 0.1);
}

.grid-cell-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-cell-location {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-cell-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.grid-empty-state {
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.geonames-attribution {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
  text-align: right;
}

.geonames-attribution a {
  color: inherit;
}

.cell-detail {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow: hidden;
}

.cell-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.cell-detail-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.text-button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
}

.text-button:hover {
  background: rgba(239, 108, 0, 0.08);
}

.text-button:disabled {
  opacity: 0.5;
  cursor: default;
  background: transparent;
}

.run-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 1 auto;
  max-height: var(--sidebar-list-max-height);
  overflow-y: auto;
  padding-right: 0.25rem;
  overscroll-behavior: contain;
}

.run-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 2rem;
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.55rem 0.15rem;
}

.run-info {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.run-info a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.86rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-info a:hover {
  text-decoration: underline;
}

.run-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  min-width: 0;
}

.run-info time,
.run-distance {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
  white-space: nowrap;
  justify-self: start;
}

.type-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.toggle-track {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease,
    transform 160ms ease;
}

.toggle-track:hover {
  border-color: rgba(239, 108, 0, 0.45);
  color: var(--accent);
  transform: translateY(-1px);
}

.toggle-track[data-active="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding: 0.55rem;
  border-radius: 12px;
  background: rgba(239, 108, 0, 0.07);
}

.metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.metric-icon {
  width: 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  text-align: center;
}

.metric-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-label {
  display: block;
  overflow: hidden;
  font-size: 0.54rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-consent {
  position: fixed;
  z-index: 2000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(50, 35, 15, 0.18);
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: 0 18px 55px rgba(42, 31, 18, 0.2);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.analytics-consent h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.analytics-consent p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.analytics-consent-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.65rem;
}

@media (max-width: 720px) {
  .stats-card {
    --mobile-sidebar-height: min(46dvh, 30rem);
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-sidebar-height);
    padding: 0.55rem 0.75rem max(0.55rem, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -12px 38px rgba(30, 38, 45, 0.18);
  }

  .sidebar-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    flex: 0 0 auto;
    margin-bottom: 0.35rem;
    padding: 0.2rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.045);
  }

  .sidebar-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    min-height: 44px;
    padding: 0.45rem 0.3rem;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    box-shadow: none;
  }

  .sidebar-tab[aria-selected="true"] {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .sidebar-tab:focus-visible {
    outline: 2px solid rgba(239, 108, 0, 0.45);
    outline-offset: 1px;
  }

  .sidebar-scroll-content {
    padding-right: 0;
    margin-right: 0;
    scrollbar-gutter: auto;
  }

  .sidebar-tab-panel {
    display: none;
  }

  .sidebar-tab-panel[data-active="true"] {
    display: block;
  }

  .sidebar-section {
    padding: 0.45rem 0;
  }

  .exploration-grid-list,
  .run-list {
    max-height: none;
    overflow: visible;
  }

  .cell-detail {
    margin-top: 0;
    padding: 0.45rem 0;
    border: 0;
    background: transparent;
  }

  .mobile-activity-empty {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--muted);
    text-align: center;
  }

  .mobile-activity-empty i {
    color: var(--accent);
    font-size: 1.35rem;
  }

  .mobile-activity-empty p {
    margin: 0;
    font-size: 0.85rem;
  }

  .cell-detail:not(.hidden) + .mobile-activity-empty {
    display: none;
  }

  .metrics {
    margin-top: 0.4rem;
  }

  .leaflet-bottom {
    bottom: calc(min(46dvh, 30rem) + 0.25rem);
  }

  .status-bar {
    top: 0.75rem;
    bottom: auto;
    left: 50%;
    width: calc(100% - 1.5rem);
  }

}

@media (max-width: 640px) {
  .site-header {
    padding: 0.4rem 0.75rem 0.4rem 0.625rem;
  }

  .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-header .brand h1 {
    font-size: 1rem;
  }

  .tagline {
    font-size: 0.56rem;
  }

  button {
    width: 100%;
    justify-content: center;
  }

  .account-menu-trigger,
  .account-menu-popover button {
    width: auto;
  }

  .toggle-track {
    width: 2rem;
  }

  .account-menu-popover button {
    width: 100%;
    justify-content: flex-start;
  }

  .analytics-consent {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-consent-actions {
    flex-direction: column;
  }
}
