:root {
  font-size: 16px;
  --readable: #e3f3f8;
  --muted: #adbdcd;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select,
.iconbtn {
  min-height: 44px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid #78ffe3;
  outline-offset: 3px;
}
button {
  cursor: pointer;
}
.muted,
small {
  color: #b2c5d3;
}
.panel p,
.detail p,
.world-panel p,
.i3-panel p {
  font-size: 1rem;
  line-height: 1.6;
}
.panel small,
.i3-muted,
.world-note,
.muted,
.result small {
  font-size: 0.875rem !important;
  line-height: 1.5;
}
.result strong,
.navbtn,
.tabs button,
.filter,
.world-field,
.i3-field,
.i3-stack {
  font-size: 0.875rem !important;
}
.result {
  min-height: 64px;
}
.catalog-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.75rem;
}
.graphics-notice {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 106px;
  transform: translateX(-50%);
  max-width: 520px;
  padding: 10px 16px;
  border: 1px solid #567085;
  border-radius: 10px;
  background: #152333;
  color: #d2e7ef;
  font-size: 0.875rem;
}
.catalog-only #space {
  background: radial-gradient(ellipse at 60% 35%, #142938, #050813 70%);
}
.diagnostics-consent {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  padding: 16px 0;
}
.diagnostics-panel pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
  color: #bde0e7;
}
.catalog-provenance {
  border-top: 1px solid #355165;
  margin-top: 20px;
  padding-top: 8px;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  z-index: 100;
  padding: 12px;
  background: #0b2634;
  color: white;
}
.skip-link:focus {
  top: 12px;
}
.i3-phase,
.world-notice {
  font-size: 0.875rem;
}
.i3-facts,
.world-panel {
  line-height: 1.55;
}
.world-toolbar {
  flex-wrap: wrap;
}
.i3-views {
  flex-wrap: wrap;
}
.i3-header,
.world-header {
  gap: 12px;
}
#results[aria-busy='true'] {
  opacity: 0.85;
}
.catalog-search-status {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 8px;
  color: #b2c5d3;
}
.detail[aria-busy='true'] > :not(.panel-heading):not(h2):not(.detail-load-status),
.detail.load-failed > :not(.panel-heading):not(h2):not(.detail-load-status) {
  display: none;
}
.offline-notice {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: #51392e;
  color: #ffe5bc;
  z-index: 100;
  font-size: 0.875rem;
}
.offline-notice[hidden] {
  display: none;
}
@media (min-width: 761px) {
  header {
    min-height: 80px;
  }
  .panel.left {
    top: 94px;
  }
  .scene-caption {
    top: 110px;
  }
  .view-options {
    bottom: 112px;
  }
}
@media (max-width: 1100px) {
  .header-actions {
    gap: 4px;
  }
  header nav {
    gap: 2px;
  }
  .header-actions .navbtn {
    padding: 7px;
  }
  .brand {
    max-width: 160px;
  }
  .scene-caption {
    max-width: 420px;
  }
}
@media (max-width: 760px) {
  header {
    height: auto;
    min-height: 118px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
  }
  .brand {
    flex: 1;
  }
  header nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-actions .navbtn {
    font-size: 0.75rem !important;
  }
  .header-actions #saved {
    display: none;
  }
  .scene-caption {
    top: 142px;
    left: 20px;
    right: 20px;
    max-width: none;
  }
  .panel.left {
    top: 126px;
    bottom: 100px;
  }
  .detail {
    top: 126px;
    bottom: 100px;
    width: calc(100vw - 24px);
    right: 12px;
  }
  .graphics-notice {
    bottom: 200px;
    max-width: calc(100vw - 28px);
    width: 100%;
  }
  .world-layout,
  .i3-layout {
    overflow: auto;
  }
  .world-header,
  .i3-header {
    position: relative;
    grid-column: 1/-1;
  }
  .world-stage,
  .i3-stage {
    min-height: 42vh;
  }
  .world-panel,
  .i3-panel {
    max-height: 45vh;
    overflow: auto;
  }
  .i3-playback {
    flex-wrap: wrap;
  }
  .world-header strong,
  .i3-brand strong {
    font-size: 1rem;
  }
  footer {
    height: 96px;
  }
  .gesture {
    display: none;
  }
  .zoom-dock {
    max-width: 58vw;
  }
  .zoom-track {
    min-width: 60px;
  }
  .view-options {
    bottom: 110px;
  }
  .view-options summary {
    min-height: 44px;
    padding: 12px;
  }
  .scale-info strong {
    font-size: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.catalog-only #labels {
  display: none;
}
.scale-jumps button,
.view-options,
.zoom-dock button,
.dialog-head button {
  font-size: 0.875rem !important;
}
.detail a {
  font-size: 0.875rem;
}
.comparison-names {
  font-size: 1rem;
}
.world-dialog button,
.world-controls input,
.world-controls select,
.i3-dialog button {
  font-size: 14px;
  min-height: 44px;
}
.world-controls p,
.world-message,
.world-metrics small {
  font-size: 14px;
  line-height: 1.5;
}
.source-record {
  padding: 10px 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .world-header {
    flex-wrap: wrap;
  }
  .world-brand {
    width: 100%;
  }
  .world-header-actions {
    width: 100%;
  }
  .world-header-actions button {
    flex: 1;
    max-width: none;
  }
  .world-toolbar {
    flex-wrap: nowrap;
  }
  .world-main {
    grid-template-rows: minmax(230px, 1fr) minmax(0, 40%);
  }
  .world-stage {
    min-height: 0;
  }
}

#catalogStatus {
  font-size: 0.78rem;
  flex-basis: 100%;
  line-height: 1.5;
}
#catalogProgress {
  width: 100%;
  height: 3px;
  accent-color: #7edbd3;
}
#retryCatalog[hidden],
#catalogProgress[hidden] {
  display: none;
}

#language {
  width: 76px;
  max-width: 90px;
  font-size: 14px;
}
#catalogStatus {
  font-size: 14px;
  color: #a9bfd1;
}
#retryCatalog {
  min-height: 44px;
}
/* The catalog itself scrolls on short screens. Its content must not shrink
   beneath the loading footer and leave result buttons covered by that footer. */
#explorePanel {
  flex-shrink: 0;
  min-height: min-content;
}
