/* Stage 1: observatory interface. The galaxy renderer and cartographic data are unchanged. */
:root {
  color-scheme: dark;
  --void: #06080b;
  --void-2: #0b0e13;
  --amber: #a5cef4;
  --amber-soft: #9aabbc;
  --rust: #5d7893;
  --bone: #e1e5eb;
  --muted: #9aa4b0;
  --cold: #a5cef4;
  --panel: rgba(9, 12, 17, 0.91);
  --line: rgba(201, 216, 234, 0.18);
  --shadow: rgba(0, 0, 0, 0.32);
  --display: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
  --prose: "Segoe UI", Arial, sans-serif;
  --mono: "Consolas", "Liberation Mono", monospace;
  font-family: var(--prose);
}

html,
body {
  background: var(--void);
}
#app {
  background: none;
}
#app::after {
  background: radial-gradient(
    ellipse at 50% 47%,
    transparent 45%,
    rgba(3, 5, 9, 0.48) 100%
  );
}
.scanlines,
.purity-seal {
  display: none;
}
.topbar,
.bottombar,
.panel,
.debug {
  clip-path: none;
  border-radius: 9px;
  box-shadow: 0 12px 38px var(--shadow);
  backdrop-filter: blur(16px);
}

/* The masthead and map controls occupy separate rows, including at tablet sizes. */
.topbar {
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  min-height: 64px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(5, 7, 10, 0.94);
  box-shadow: none;
  gap: 24px;
}
.brand {
  min-width: 0;
  gap: 15px;
  align-items: center;
  flex: 0 1 auto;
  color: var(--bone);
  animation: none;
  text-shadow: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  opacity: 0.85;
  filter: grayscale(1);
}
.brand h1 {
  font-size: clamp(17px, 1.7vw, 25px);
  font-weight: 400;
  letter-spacing: 0.2em;
}
.brand > span {
  display: none;
}
.banner-actions {
  position: static;
  display: flex;
  width: auto;
  align-items: center;
  gap: 20px;
  order: 0;
}
.banner-actions > .kofi-link {
  flex: 0 0 auto;
}
.kofi-link {
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 12px 0;
  opacity: 1;
}
.kofi-link:hover {
  color: #fff;
  background: none;
}
.kofi-skull {
  display: none;
}
.contact-link {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.contact-link .contact-email {
  font-family: var(--prose);
  font-size: 13px;
  letter-spacing: 0;
}
.controls {
  position: fixed;
  z-index: 20;
  top: 86px;
  left: 348px;
  right: 24px;
  width: auto;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: nowrap;
  pointer-events: none;
}
.controls > * {
  pointer-events: auto;
}
.era-switch,
.layer-controls,
.map-navigation {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 11, 16, 0.93);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  height: 42px;
  align-items: stretch;
}
.era-switch {
  flex: 0 0 auto;
}
.era-option {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 0 16px;
}
.era-option + .era-option {
  border-left: 1px solid var(--line);
}
.era-option.active {
  color: #e4f2ff;
  background: rgba(108, 167, 224, 0.12);
  box-shadow: inset 0 0 0 1px rgba(133, 187, 239, 0.45);
  border-radius: 4px;
}
.era-option[data-era="m42"].active {
  color: #f1b6cb;
  background: rgba(183, 98, 135, 0.12);
  text-shadow: none;
  box-shadow: inset 0 0 0 1px rgba(209, 135, 167, 0.4);
}
.layer-controls {
  min-width: 0;
}
.icon-button,
.toggle,
.field,
.range-field {
  background-color: transparent;
  border-color: var(--line);
  color: var(--bone);
  border-radius: 4px;
  height: 40px;
  font-size: 14px;
}
.layer-controls > button {
  border: 0;
  border-radius: 0;
  padding: 0 14px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.09em;
  gap: 8px;
  height: auto;
}
.layer-controls > button + button {
  border-left: 1px solid var(--line);
}
#motionToggle[aria-pressed="true"] .motion-play,
#motionToggle[aria-pressed="false"] .motion-pause {
  display: none;
}
.control-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.toggle:not([aria-pressed="true"]) {
  color: #818b97;
  border-color: var(--line);
}
.toggle[aria-pressed="true"] {
  color: #dae8f5;
  border-color: var(--line);
  background: rgba(142, 185, 225, 0.08);
  box-shadow: none;
}
.toggle[aria-pressed="true"] .control-icon {
  color: var(--amber);
}
.icon-button:hover,
.toggle:hover,
.field:focus,
.range-field:focus {
  color: #fff;
  border-color: #8ea8c2;
  box-shadow: none;
  background-color: rgba(171, 201, 230, 0.08);
}
#resetCamera {
  color: var(--muted);
  border-color: var(--line);
}
.ctrl-divider {
  display: none;
}
.map-navigation {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 60px;
  height: 42px;
}
.map-navigation button {
  width: 54px;
  height: auto;
  border: 0;
  background: none;
  border-radius: 0;
}
.map-navigation button + button {
  border-left: 1px solid var(--line);
}

/* A compact archive leaves the galaxy visible below the results. */
.panel {
  top: 150px;
  bottom: 122px;
  max-height: 960px;
  width: 390px;
  overflow: hidden;
}
.left-panel {
  left: 24px;
  top: 86px;
  bottom: auto;
  width: 300px;
  height: auto;
  max-height: min(64vh, 620px);
  display: flex;
  flex-direction: column;
}
.left-panel .panel-head {
  flex: 0 0 46px;
}
.left-panel .panel-body {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
.left-panel .row-list {
  max-height: max(100px, calc(min(64vh, 620px) - 296px));
  flex: 0 1 auto;
}
.right-panel {
  right: 24px;
  width: 390px;
}
.panel-head {
  height: 46px;
  padding: 0 10px 0 18px;
  border-color: var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.14em;
}
.panel-body {
  height: calc(100% - 46px);
  padding: 14px;
}
.right-panel .panel-body {
  padding: 0;
}
.collapse {
  width: 30px;
  height: 30px;
  font-family: var(--prose);
  font-size: 21px;
  border-color: transparent;
  color: var(--muted);
}
.panel.collapsed {
  visibility: hidden;
}
.panel.collapsed .panel-head {
  visibility: visible;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.panel.collapsed.left-panel {
  transform: translateX(calc(-100% + 40px));
}
.panel.collapsed.right-panel {
  transform: translateX(calc(100% - 40px));
}
.panel.collapsed .panel-body {
  visibility: hidden;
}
.panel.collapsed .panel-head span {
  display: none;
}
.left-panel.collapsed .panel-head {
  justify-content: flex-end;
}
.index-tools {
  gap: 10px;
  margin-bottom: 14px;
}
.field {
  width: 100%;
  padding: 0 11px;
  background-color: rgba(0, 0, 0, 0.12);
}
select.field {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
select.field option {
  background: #10141b;
  color: var(--bone);
}
#searchInput {
  padding-left: 34px;
  font-family: var(--prose);
  font-size: 14px;
  background-size: 16px;
}
#searchInput::placeholder {
  color: #8994a0;
}
.index-note {
  order: 4;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 0 0;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.result-count {
  color: var(--muted);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.row-list {
  padding-right: 3px;
}
.archive-row {
  min-height: 62px;
  margin-bottom: 5px;
  padding: 10px;
  gap: 12px;
  border-color: transparent;
  background: transparent;
  clip-path: none;
  border-radius: 3px;
}
.archive-row:hover {
  border-color: rgba(190, 206, 224, 0.25);
  background: rgba(157, 190, 224, 0.06);
}
.archive-row.active {
  border-color: rgba(130, 180, 230, 0.43);
  background: rgba(111, 162, 212, 0.12);
}
.archive-row.active::after {
  content: "";
  flex: 0 0 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(157, 201, 242, 0.4);
}
.row-glyph {
  filter: grayscale(1) brightness(1.35);
}
.row-name {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}
.row-meta {
  font-family: var(--prose);
  font-size: 12px;
  color: #a1acb9;
  line-height: 1.45;
}
.archive-row:hover .row-name,
.archive-row.active .row-name {
  color: #f1f6fc;
}

/* Dossier hierarchy: image, identity, classification, tabs, full record. */
.dossier {
  padding: 0 20px 22px;
  scrollbar-gutter: stable;
  scroll-padding-top: 84px;
}
.doc-bar {
  margin: 0;
  padding: 16px 0 6px;
  border: 0;
  color: #9aa7b6;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  white-space: normal;
}
.doc-banner {
  height: auto;
  aspect-ratio: 1.6;
  margin: 0 -8px 10px;
  border: 0;
  clip-path: none;
  background: #000000;
  border-radius: 6px;
}
.portrait-caption {
  position: absolute;
  z-index: 3;
  bottom: 7px;
  right: 9px;
  color: #91a0b3;
  font: 10px var(--display);
  letter-spacing: 0.06em;
  opacity: 0.8;
}
.right-panel .panel-body::before {
  display: none;
}
.doc-banner canvas {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}
.doc-banner::after {
  background: linear-gradient(
    180deg,
    rgba(9, 12, 17, 0),
    rgba(9, 12, 17, 0) 74%,
    rgba(9, 12, 17, 0.65)
  );
}
.doc-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}
.dossier .doc-identity h2 {
  flex: 1 1 auto;
  max-width: 100%;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.15;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  margin: 0;
}
.badge {
  flex: 0 0 auto;
  color: var(--muted);
  background: none;
  border-color: var(--line);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 6px;
  border-radius: 3px;
  margin: 0;
}
.classification {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 14px;
  gap: 14px;
}
.classification .kv + .kv {
  border-left: 1px solid var(--line);
  padding-left: 14px;
}
.kv {
  border: 0;
  background: none;
  padding: 0;
}
.kv span {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.45;
  margin-bottom: 5px;
}
.kv strong {
  font-family: var(--prose);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.doc-ref {
  margin: 16px 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.5;
}
.doc-stamp {
  position: static;
  transform: none;
  display: inline-flex;
  border: 1px solid var(--line);
  background: none;
  box-shadow: none;
  opacity: 1;
  font-size: 12px;
  padding: 3px 6px;
  letter-spacing: 0;
}
.stamp-amber {
  color: var(--muted);
  border-color: var(--line);
}
.stamp-cold {
  color: var(--cold);
  border-color: #526f8c;
}
.stamp-crimson {
  color: #ed9eb0;
  border-color: #85485b;
}
.doc-mini {
  top: 0;
  margin: 0 -4px;
  background: #0b0e14;
  border-color: var(--line);
}
.doc-mini strong {
  font-family: var(--display);
  font-size: 14px;
  color: var(--bone);
  letter-spacing: 0.1em;
  font-weight: 400;
}
.dossier.scrolled .doc-mini {
  max-height: 38px;
  height: 38px;
  padding: 6px 4px;
}
.tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 42px;
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
  background: #0b0e14;
}
.dossier.scrolled .tabs {
  top: 38px;
}
.tab {
  height: 42px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
}
.tab:hover {
  color: #fff;
  background: rgba(163, 190, 216, 0.05);
}
.tab.active {
  color: #f0f3f7;
  background: none;
  border-color: #c7ddef;
}
.copy,
.section-copy p,
.tl-event p {
  font-family: var(--prose);
  font-size: 16px;
  line-height: 1.65;
  color: #d0d6df;
}
.section-copy p:first-child:not(:has(.era-note))::first-letter,
.tab-content > p.copy:first-child::first-letter {
  float: none;
  font: inherit;
  color: inherit;
  padding: 0;
}
.section-copy.section-lead {
  padding: 0 0 14px;
}
.section-block,
.section-block[open] {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  clip-path: none;
  margin: 0;
}
.section-title {
  color: var(--bone);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 14px 0;
  border: 0;
}
.section-title::marker {
  color: var(--muted);
}
.section-copy {
  padding: 0 0 14px;
}
.era-note {
  font-size: 12px;
}
.dossier-meta {
  grid-template-columns: 1fr;
  gap: 0;
  margin: 20px 0 14px;
  border-top: 1px solid var(--line);
}
.dossier-meta .kv {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  align-items: baseline;
}
.dossier-meta .kv span {
  margin: 0;
}
.chips {
  gap: 7px;
  margin: 16px 0;
}
.chip {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.dossier-action {
  min-height: 38px;
  border-color: var(--line);
  background: transparent;
  color: var(--bone);
  border-radius: 4px;
  font-size: 12px;
}
.dossier-action:hover,
.dossier-action:focus-visible {
  color: #fff;
  border-color: #8ea8c2;
  background: rgba(171, 201, 230, 0.08);
}
.share-status {
  font-size: 12px;
}
.share-status:empty {
  display: none;
}
.lore-link,
.dossier-page-link {
  color: var(--amber);
  text-decoration-color: #6d8bac;
}
.lore-link:hover,
.dossier-page-link:hover {
  color: #d8ecff;
  text-shadow: none;
}
.tl-event {
  margin-bottom: 22px;
}
.tl-event strong {
  font-family: var(--display);
  font-size: 14px;
  color: var(--amber);
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.timeline2::before {
  width: 1px;
  background: var(--line);
}
.tl-node {
  background: #0b1119;
  border-color: var(--amber);
}
.rift-break {
  clip-path: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-color: #82465a;
  background: rgba(157, 65, 103, 0.1);
  color: #ecadc3;
}
#relationChart {
  clip-path: none;
  border-color: var(--line);
  border-radius: 5px;
}
.relation {
  border-color: var(--line);
  background: transparent;
  padding: 12px;
  border-radius: 4px;
  font-size: 14px;
}
.dossier-empty {
  font-size: 16px;
  line-height: 1.6;
}
.empty-sub {
  font-size: 12px;
  letter-spacing: 0.04em;
}
.empty-glyph {
  color: var(--muted);
  text-shadow: none;
}

.bottombar {
  left: 24px;
  right: 24px;
  bottom: 14px;
  min-height: 28px;
  padding: 0;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  font-size: 12px;
}
.footer-copy {
  opacity: 1;
  font-size: 12px;
}
.footer-guides {
  color: #a4b2c3;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.thought {
  display: none;
}
.coord-readout {
  position: fixed;
  left: 26px;
  bottom: 73px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.07em;
}
.debug {
  bottom: 115px;
  color: var(--bone);
  border-color: var(--line);
}
#bootScreen {
  background: #05070a;
}
#bootLines {
  color: #aabacb;
  text-shadow: none;
  font-family: var(--mono);
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #364350;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible {
  outline: 2px solid #acd5fb;
  outline-offset: 2px;
}
.dev-only {
  display: none !important;
}
.debug-visible .dev-only {
  display: inline-flex !important;
}

@media (max-width: 1220px) {
  .topbar {
    padding: 0 20px;
    gap: 20px;
  }
  .brand h1 {
    letter-spacing: 0.13em;
    font-size: 20px;
  }
  .banner-actions {
    gap: 14px;
  }
  .kofi-link {
    font-size: 11px;
    letter-spacing: 0.05em;
  }
  .contact-link {
    padding-left: 14px;
  }
  .left-panel {
    left: 20px;
    width: 270px;
  }
  .right-panel {
    right: 20px;
    width: 350px;
  }
  .controls {
    left: 310px;
    right: 20px;
    gap: 12px;
  }
  .era-option {
    padding: 0 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  .layer-controls > button {
    padding: 0 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  .layer-controls .control-icon {
    display: none;
  }
}

@media (max-width: 980px) {
  .topbar {
    height: 94px;
    min-height: 94px;
    flex-wrap: wrap;
    align-content: center;
    gap: 4px;
    padding: 8px 20px;
  }
  .brand {
    width: 100%;
    flex-basis: 100%;
  }
  .brand h1 {
    font-size: 21px;
  }
  .banner-actions {
    width: auto;
    gap: 18px;
  }
  .banner-actions > .kofi-link {
    flex: 0 0 auto;
    padding: 4px 0;
    font-size: 12px;
    overflow: visible;
  }
  .banner-actions .contact-link {
    padding-left: 18px;
  }
  .controls {
    top: 110px;
    left: 20px;
    right: 20px;
  }
  .era-option {
    font-size: 12px;
    padding: 0 14px;
  }
  .layer-controls > button {
    padding: 0 12px;
    font-size: 12px;
  }
  .left-panel {
    top: 170px;
    max-height: min(57vh, 580px);
    width: 270px;
  }
  .right-panel {
    top: 170px;
    width: 350px;
  }
  .right-panel:not(.collapsed) {
    left: auto;
    right: 20px;
  }
  .footer-copy {
    max-width: 50%;
  }
}

@media (max-width: 700px) {
  .topbar {
    height: calc(86px + env(safe-area-inset-top, 0px));
    min-height: 86px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 8px;
    top: 0;
  }
  .brand {
    gap: 10px;
  }
  .brand-mark {
    width: 24px;
    height: 24px;
  }
  .brand h1 {
    font-size: clamp(15px, 4vw, 20px);
    letter-spacing: 0.12em;
  }
  .banner-actions {
    gap: 13px;
  }
  .banner-actions > .kofi-link {
    font-size: 11px;
    letter-spacing: 0.02em;
  }
  .banner-actions .contact-link {
    padding-left: 13px;
  }
  .contact-link .contact-email {
    font-size: 11px;
  }
  .controls {
    top: calc(98px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .era-switch {
    height: 38px;
  }
  .era-option {
    font-size: 12px;
    padding: 0 20px;
    min-height: 36px;
  }
  .layer-controls {
    justify-content: center;
    height: 38px;
  }
  .layer-controls > button {
    font-size: 12px;
    padding: 0 9px;
    letter-spacing: 0.02em;
  }
  .panel,
  .left-panel,
  .right-panel,
  .right-panel:not(.collapsed) {
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    height: min(55dvh, 490px);
    max-height: none;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  }
  .right-panel {
    z-index: 21;
  }
  .panel-head {
    padding-top: 7px;
    height: 48px;
  }
  .panel-body {
    height: calc(100% - 48px);
  }
  .panel::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 3px;
    background: #738293;
    border-radius: 2px;
    z-index: 6;
  }
  .panel.collapsed.left-panel {
    transform: translateY(calc(100% - 48px));
  }
  .panel.collapsed.right-panel {
    transform: translateY(calc(100% + 40px + env(safe-area-inset-bottom, 0px)));
  }
  .panel.collapsed .panel-head span {
    display: inline;
  }
  .panel.collapsed .panel-head {
    border: 0;
  }
  .left-panel.collapsed .panel-head {
    justify-content: space-between;
  }
  .left-panel .panel-body {
    padding: 12px 16px;
  }
  .left-panel .panel-head {
    flex-basis: 48px;
  }
  .left-panel .row-list {
    max-height: none;
    flex: 1;
  }
  .index-tools {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }
  #searchInput {
    grid-column: 1 / -1;
  }
  .field {
    height: 40px;
  }
  .index-note {
    padding-top: 7px;
    margin-top: 4px;
  }
  .result-count {
    margin-bottom: 6px;
  }
  .archive-row {
    min-height: 56px;
  }
  .dossier {
    padding: 0 20px 22px;
  }
  .doc-banner {
    max-width: 220px;
    margin: 0 auto 10px;
  }
  .doc-identity {
    padding-bottom: 8px;
  }
  .classification {
    padding: 8px 0;
    margin-bottom: 6px;
  }
  .doc-bar {
    font-size: 11px;
    padding-top: 12px;
  }
  .map-navigation {
    right: 12px;
    bottom: calc(min(55dvh, 490px) + 44px + env(safe-area-inset-bottom, 0px));
    height: 38px;
  }
  .map-navigation button {
    width: 44px;
  }
  .coord-readout {
    display: none;
  }
  .bottombar {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 32px;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
    background: #080b10;
    z-index: 22;
    border-top: 1px solid var(--line);
  }
  .footer-copy {
    font-size: 11px;
    flex: 1;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .footer-guides {
    font-size: 11px;
  }
  .debug {
    bottom: 55%;
  }
}

@media (max-height: 570px) and (min-width: 701px) {
  .right-panel {
    width: min(340px, 35vw);
  }
  .left-panel .panel-body {
    display: block;
    overflow: auto;
  }
  .left-panel .row-list {
    max-height: none;
    overflow: visible;
  }
  .panel,
  .left-panel,
  .right-panel {
    top: 164px;
    bottom: 52px;
    height: auto;
  }
  .doc-banner {
    max-width: 230px;
    margin: 0 auto 8px;
  }
  .map-navigation {
    bottom: 52px;
    right: calc(50% - 81px);
  }
  .coord-readout {
    display: none;
  }
}

@media (max-width: 700px) and (max-height: 650px) {
  .panel,
  .left-panel,
  .right-panel,
  .right-panel:not(.collapsed) {
    height: 45dvh;
  }
  .map-navigation {
    bottom: calc(45dvh + 44px + env(safe-area-inset-bottom, 0px));
  }
  .doc-banner {
    max-width: 160px;
  }
}

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