:root {
  color-scheme: light;
  --ink: #102019;
  --muted: #68766f;
  --paper: rgba(255, 253, 247, 0.96);
  --paper-solid: #fffdf7;
  --line: rgba(20, 45, 34, 0.16);
  --blue: #1769e0;
  --blue-dark: #0c4192;
  --sand: #d7ad62;
  --shadow: 0 18px 60px rgba(18, 35, 27, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell,
#map {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  margin: 0;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  background: #d9e2dc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.media-modal-open {
  background: #07120d;
}

body.media-modal-chrome-hidden .top-bar,
body.media-modal-chrome-hidden .timeline-panel,
body.media-modal-chrome-hidden .map-side-popup,
body.media-modal-chrome-hidden .map-popup-connector {
  display: none !important;
}

body.media-modal-chrome-restoring::after {
  content: "";
  position: fixed;
  z-index: 2147482999;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 4px solid rgba(12, 65, 146, 0.22);
  border-top-color: var(--blue);
  border-radius: 50%;
  background: transparent;
  animation: modal-loading-spin 0.85s linear infinite;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

.top-bar {
  position: fixed;
  z-index: 10;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  max-width: calc(100vw - 40px);
  padding: 13px 16px 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 2px;
  color: #6e6148;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.filters {
  display: flex;
  gap: 6px;
}

.filters label {
  cursor: pointer;
}

.filters input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filters span {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  transition: 160ms ease;
}

.filters input:checked + span {
  border-color: #1e6748;
  color: white;
  background: #1e6748;
}

.filters input:focus-visible + span {
  outline: 3px solid rgba(23, 105, 224, 0.35);
  outline-offset: 2px;
}

.guided-mode-button {
  padding: 8px 12px;
  border: 1px solid #a66b08;
  border-radius: 999px;
  color: #754700;
  background: #fff8e8;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.guided-mode-button:hover,
.guided-mode-button.active {
  color: white;
  background: #a66b08;
}

.guided-mode-button:focus-visible {
  outline: 3px solid rgba(23, 105, 224, 0.35);
  outline-offset: 2px;
}

.search-control {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(130px, 190px) auto auto;
  align-items: center;
  gap: 7px;
}

.search-control input,
.search-control select {
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: white;
  outline: none;
}

.search-control select {
  font-size: 0.78rem;
}

.search-control input:focus,
.search-control select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.18);
}

.search-control button {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  background: white;
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}

.search-control span {
  min-width: 54px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
  white-space: nowrap;
}

.timeline-panel {
  position: fixed;
  z-index: 10;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  padding: 16px 20px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.selection-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.selection-copy {
  min-width: 0;
  text-align: center;
}

.selection-copy strong,
.selection-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 600;
}

.selection-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-button {
  width: 42px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: white;
  cursor: pointer;
}

.nav-button:hover:not(:disabled) {
  border-color: #1e6748;
  color: #1e6748;
}

.nav-button:disabled {
  cursor: default;
  opacity: 0.35;
}

.guided-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 0.7rem;
}

.guided-controls[hidden] {
  display: none;
}

.guided-controls button,
.guided-controls select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: white;
}

.guided-controls button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  cursor: pointer;
}

.guided-controls select {
  padding: 4px 24px 4px 8px;
}

.timeline-track {
  position: relative;
  margin-top: 23px;
}

#timeline {
  display: block;
  width: 100%;
  height: 28px;
  margin: 0;
  cursor: ew-resize;
  accent-color: var(--blue);
  touch-action: none;
}

.day-labels {
  position: absolute;
  right: 8px;
  bottom: 22px;
  left: 8px;
  height: 20px;
  pointer-events: none;
}

.day-label {
  position: absolute;
  bottom: 0;
  color: #6f7a74;
  font-size: 0.64rem;
  font-weight: 700;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  padding: 0 2px;
  background: transparent;
}

.day-label::after {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 1px;
  height: 8px;
  background: var(--day-color, rgba(16, 32, 25, 0.22));
  content: "";
}

.day-label::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--day-color, var(--blue));
  content: "";
}

.day-label:hover,
.day-label:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.timeline-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.map-dot {
  position: relative;
  isolation: isolate;
  width: 11px;
  height: 11px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 1px 5px rgba(6, 40, 89, 0.48);
  cursor: pointer;
  transition: 140ms ease;
}

.map-dot:hover,
.map-dot.selected {
  width: 18px;
  height: 18px;
  border-width: 3px;
  background: #ffb72b;
  box-shadow: 0 0 0 3px rgba(12, 65, 146, 0.72), 0 4px 12px rgba(0, 0, 0, 0.32);
}

.cluster-dot {
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  place-items: center;
  border: 3px solid white;
  border-radius: 999px;
  color: white;
  background: var(--blue);
  box-shadow: 0 2px 9px rgba(6, 40, 89, 0.48);
  font-size: 0.75rem;
  font-weight: 850;
  cursor: pointer;
}

.map-dot.scrubbing::after,
.cluster-dot.scrubbing::after {
  position: absolute;
  z-index: -1;
  inset: -9px;
  border: 3px solid #ffb72b;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  animation: timeline-focus-pulse 900ms ease-out infinite;
}

@keyframes timeline-focus-pulse {
  0% {
    opacity: 1;
    transform: scale(0.72);
  }

  100% {
    opacity: 0;
    transform: scale(1.45);
  }
}

.cluster-dot.selected {
  background: #c98200;
  box-shadow: 0 0 0 4px rgba(12, 65, 146, 0.72), 0 3px 12px rgba(0, 0, 0, 0.3);
}

.focal-marker {
  width: 18px;
  height: 18px;
  border: 4px solid white;
  border-radius: 50%;
  background: #d82d32;
  box-shadow:
    0 0 0 2px rgba(139, 17, 23, 0.82),
    0 4px 12px rgba(67, 8, 11, 0.46);
  pointer-events: none;
}

.map-side-popup {
  position: fixed;
  z-index: 20;
  box-sizing: border-box;
  width: min(44vw, 720px);
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 32px);
  padding: 17px;
  overflow: auto;
  border: 2px solid #174f91;
  border-radius: 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 32px rgba(7, 31, 62, 0.3);
  pointer-events: auto;
  transform: translateY(-50%);
}

.map-popup-connector {
  position: fixed;
  z-index: 19;
  height: 0;
  border-top: 3px solid #174f91;
  pointer-events: none;
  transform-origin: 0 50%;
}

.map-popup-connector::before {
  position: absolute;
  top: -9px;
  left: -2px;
  border-top: 8px solid transparent;
  border-right: 12px solid #174f91;
  border-bottom: 8px solid transparent;
  content: "";
}

.map-side-popup-close {
  position: absolute;
  z-index: 1;
  top: 5px;
  right: 5px;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #24342c;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.map-side-popup-close:hover,
.map-side-popup-close:focus-visible {
  color: white;
  background: var(--blue-dark);
}

.popup-card {
  width: 100%;
  padding: 4px 2px 2px;
}

.popup-button,
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #0b100d;
  cursor: zoom-in;
}

.popup-button img,
.gallery-item img {
  display: block;
  width: 100%;
  height: clamp(260px, 42vh, 440px);
  background: #0b100d;
  object-fit: contain;
}

.popup-caption {
  margin: 9px 2px 2px;
  color: #46534c;
  font-size: 0.72rem;
  line-height: 1.45;
}

.popup-description {
  display: -webkit-box;
  margin: 8px 2px 2px;
  overflow: hidden;
  color: #26362e;
  font-size: 0.72rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.video-badge {
  display: inline-block;
  margin-right: 5px;
  padding: 2px 5px;
  border-radius: 4px;
  color: white;
  background: var(--blue-dark);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cluster-gallery {
  width: 100%;
}

.cluster-gallery h3 {
  margin: 2px 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.gallery-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 56vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 2px 8px;
  overscroll-behavior-block: contain;
}

.gallery-item img {
  height: clamp(140px, 20vh, 210px);
}

.gallery-item span {
  display: block;
  padding: 7px;
  overflow: hidden;
  color: var(--ink);
  background: white;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-modal {
  position: fixed;
  z-index: 2147483000;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  display: none;
  height: var(--modal-viewport-height, 100dvh);
  padding: max(12px, 2.5dvh) max(12px, 2.5vw);
  place-items: center;
  color: var(--ink);
  background: transparent;
  isolation: isolate;
}

.media-modal.open {
  display: grid;
}

.media-modal-static-map,
.media-modal-backdrop {
  display: none;
}

.media-modal-window {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: var(--paper-solid);
  box-shadow: none;
  isolation: isolate;
  pointer-events: auto;
}

.modal-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-media-frame,
.modal-media {
  position: relative;
  z-index: 1;
  display: grid;
  contain: paint;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  background: #0b100d;
}

.modal-media-frame img,
.modal-media-frame video,
.modal-media img,
.modal-media video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}

.modal-photo {
  width: 100%;
  height: 100%;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
}

.modal-photosphere {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050806;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.modal-photosphere.dragging {
  cursor: grabbing;
}

.modal-photosphere:focus-visible {
  outline: 3px solid rgba(242, 197, 0, 0.85);
  outline-offset: -6px;
}

.modal-photosphere canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.photosphere-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  color: #fffdf7;
  background: rgba(0, 0, 0, 0.58);
  font-size: 0.78rem;
  font-weight: 700;
  pointer-events: none;
  opacity: 0.86;
}

.modal-media-frame img,
.modal-media img {
  width: auto;
  height: auto;
}

.modal-media-frame video,
.modal-media video {
  width: 100%;
  height: 100%;
}

.modal-media-frame.loading::before,
.modal-media.loading::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: rgba(11, 16, 13, 0.82);
  pointer-events: none;
}

.modal-media-frame.loading::after,
.modal-media.loading::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fffdf7;
  border-radius: 50%;
  animation: modal-loading-spin 0.85s linear infinite;
  pointer-events: none;
}

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

.modal-details {
  position: relative;
  z-index: 1;
  align-self: stretch;
  min-width: 0;
  padding: 30px 22px;
  overflow-y: auto;
  background: var(--paper-solid);
  contain: paint;
  -webkit-overflow-scrolling: touch;
}

.modal-details h2 {
  margin: 4px 0 22px;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 600;
}

.modal-description {
  margin: -10px 0 18px;
  color: #33443b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
  line-height: 1.55;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -5px 0 22px;
}

.modal-tags:empty {
  display: none;
}

.tag-chip {
  padding: 5px 8px;
  border: 1px solid rgba(23, 105, 224, 0.22);
  border-radius: 999px;
  color: var(--blue-dark);
  background: rgba(23, 105, 224, 0.07);
  font-size: 0.66rem;
  cursor: pointer;
}

.tag-chip:hover,
.tag-chip:focus-visible {
  border-color: var(--blue);
  background: rgba(23, 105, 224, 0.14);
}

.metadata-editor {
  display: grid;
  gap: 10px;
  margin: -6px 0 22px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
}

.metadata-editor[hidden] {
  display: none;
}

.metadata-editor label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metadata-editor textarea,
.metadata-editor input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  padding: 8px 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
}

.metadata-editor textarea {
  resize: vertical;
}

.metadata-editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metadata-editor-actions button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.metadata-editor-actions .remove-media-button {
  background: #b42318;
}

.metadata-editor-actions .remove-media-button:hover,
.metadata-editor-actions .remove-media-button:focus-visible {
  background: #8f1c13;
}

#edit-status {
  color: var(--muted);
  font-size: 0.72rem;
}

.modal-details dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 9px 12px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.modal-details dt {
  color: var(--muted);
}

.modal-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.original-link {
  display: inline-block;
  margin-top: 26px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 750;
}

.loading-card {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 50%;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--paper-solid);
  box-shadow: var(--shadow);
  font-weight: 700;
  transform: translate(-50%, -50%);
}

.loading-card.hidden {
  display: none;
}

.fatal-error {
  max-width: 420px;
  color: #8b1d18;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }

  .top-bar {
    top: 10px;
    right: 10px;
    left: 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    max-height: min(34dvh, 230px);
    padding: 10px;
    overflow-y: auto;
    border-radius: 14px;
    overscroll-behavior: contain;
  }

  .eyebrow {
    font-size: 0.58rem;
  }

  h1 {
    font-size: 1.12rem;
  }

  .filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .filters span,
  .guided-mode-button {
    padding: 7px 10px;
    font-size: 0.72rem;
  }

  .search-control {
    grid-template-columns: minmax(0, 1fr) minmax(110px, 0.7fr) auto auto;
    width: 100%;
    gap: 6px;
  }

  .search-control input,
  .search-control select {
    padding: 8px 9px;
  }

  .search-control button {
    padding: 7px 8px;
  }

  .search-control span {
    min-width: 44px;
    font-size: 0.62rem;
  }

  .timeline-panel {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    padding: 13px 12px 9px;
    border-radius: 15px;
  }

  .selection-summary {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
  }

  .selection-copy strong {
    font-size: 0.92rem;
  }

  .selection-copy span {
    font-size: 0.68rem;
  }

  .nav-button {
    width: 38px;
    height: 34px;
  }

  .day-label:nth-child(even) {
    display: none;
  }

  .guided-controls {
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
  }

  .guided-controls > span {
    width: 100%;
    text-align: center;
  }

  .timeline-track {
    margin-top: 18px;
  }

  .timeline-footer {
    font-size: 0.62rem;
  }

  .map-side-popup {
    width: auto;
    max-width: none;
    padding: 12px;
    border-radius: 14px;
    transform: none;
  }

  .map-popup-connector {
    display: none;
  }

  .popup-button img,
  .gallery-item img {
    height: clamp(170px, 32dvh, 280px);
  }

  .popup-caption,
  .popup-description {
    font-size: 0.68rem;
  }

  .cluster-gallery h3 {
    margin-right: 28px;
    font-size: 0.94rem;
  }

  .gallery-scroll {
    gap: 7px;
    max-height: min(42dvh, 330px);
  }

  .gallery-item img {
    height: clamp(100px, 19dvh, 170px);
  }

  .media-modal {
    padding: max(10px, 2.5dvh) max(10px, 2.5vw);
  }

  .media-modal-window {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 14px;
    box-shadow: none;
  }

  .media-modal-window {
    grid-template-rows: minmax(0, 54%) minmax(150px, 1fr);
    grid-template-columns: 1fr;
  }

  .modal-close {
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 2px solid white;
    color: white;
    background: rgba(12, 25, 18, 0.95);
  }

  .modal-details {
    padding: 13px 14px;
  }

  .modal-details h2 {
    margin-bottom: 16px;
    font-size: 1.12rem;
  }

  .modal-description {
    font-size: 0.86rem;
  }

  .modal-details dl {
    grid-template-columns: 78px 1fr;
    gap: 8px;
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .top-bar {
    max-height: min(36dvh, 220px);
  }

  .search-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-control select {
    grid-column: 1 / -1;
  }

  .search-control span {
    grid-column: 1 / -1;
    text-align: left;
  }

  .gallery-scroll {
    grid-template-columns: 1fr 1fr;
  }

  .selection-copy strong {
    font-size: 0.82rem;
  }

  .selection-copy span {
    display: none;
  }

  .media-modal {
    padding: max(8px, 2.5dvh) max(8px, 2.5vw);
  }

  .media-modal-window {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
  }
}

@media (max-height: 640px) and (max-width: 700px) {
  .top-bar {
    max-height: 28dvh;
  }

  .timeline-footer,
  .selection-copy span {
    display: none;
  }

  .timeline-track {
    margin-top: 14px;
  }

  .media-modal-window {
    grid-template-rows: minmax(0, 52%) minmax(130px, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-dot.scrubbing::after,
  .cluster-dot.scrubbing::after {
    opacity: 1;
    animation: none;
  }

  .modal-media-frame.loading::after,
  .modal-media.loading::after,
  body.media-modal-chrome-restoring::after {
    animation: none;
  }
}
