:root {
  color-scheme: dark;
  font-family: Manrope, Arial, sans-serif;
  font-size: 16px;
  color: #eaf2fc;
  background: #060a11;
  --muted: #92a3ba;
  --border: #bed9ff20;
  --accent: #a6d8ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button,
input,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
#space,
#labels {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#space {
  touch-action: none;
}
#labels {
  pointer-events: none;
  overflow: hidden;
}
.label {
  position: absolute;
  white-space: nowrap;
  font-size: 12px;
  color: #bfdbf3;
  text-shadow: 0 2px 4px #000;
  transform: translate(10px, -50%);
}
.label.selected {
  font-size: 14px;
  color: white;
}
.label:before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  border: 1px solid #a6d8ff;
  position: absolute;
  left: -12px;
  top: 5px;
}
header {
  position: fixed;
  inset: 0 0 auto;
  height: 86px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: linear-gradient(#070c16f5, #070c1680, transparent);
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  letter-spacing: 2.5px;
  font-weight: 800;
}
.brandmark {
  font-size: 38px;
  color: var(--accent);
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin-top: 4px;
}
.version {
  font-size: 11px;
  letter-spacing: 0;
  border: 1px solid #95cfff35;
  border-radius: 5px;
  padding: 4px 6px;
  align-self: flex-start;
  margin-top: 8px;
  color: #acd5f6;
}
nav {
  display: flex;
  gap: 3px;
  padding: 5px;
  background: #101a29d9;
  border: 1px solid var(--border);
  border-radius: 30px;
}
.navbtn {
  border: 0;
  background: transparent;
  border-radius: 25px;
  padding: 10px 19px;
  color: var(--muted);
  font-size: 14px;
}
.navbtn.active {
  background: #b2d9fa;
  color: #14283c;
  font-weight: 700;
}
.navbtn:hover:not(.active) {
  background: #ffffff0b;
  color: white;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
#language {
  background: #152132;
  border: 1px solid var(--border);
  padding: 7px;
  border-radius: 7px;
  font-size: 13px;
  color: #d5e9fc;
}
.iconbtn {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  font-size: 23px;
  color: #abbdd2;
}
.iconbtn:hover {
  background: #ffffff10;
}
.panel {
  background: #0e1724ef;
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  position: fixed;
  z-index: 4;
  box-shadow: 0 18px 65px #0004;
}
.left {
  top: 104px;
  left: 24px;
  bottom: 124px;
  width: 302px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  transition:
    transform 0.2s,
    opacity 0.2s;
  min-height: 0;
}
.left.closed {
  transform: translateX(-350px);
  opacity: 0;
  pointer-events: none;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-heading h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 17px 0 15px;
  padding: 10px;
  border: 1px solid #bdd8ff29;
  background: #060c1680;
  border-radius: 9px;
}
.searchbox > span {
  font-size: 24px;
  line-height: 1;
  color: #8da8c7;
}
.searchbox input {
  width: 100%;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  color: inherit;
  font-size: 14px;
}
kbd {
  font-size: 12px;
  color: #7086a2;
  border: 1px solid #ffffff23;
  border-radius: 3px;
  padding: 1px 4px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 20px;
  margin-bottom: 14px;
}
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 9px 1px 12px;
  color: #8298b3;
  font-size: 14px;
}
.tabs button[aria-selected='true'] {
  color: #c6e6ff;
  border-bottom-color: #a6d8ff;
}
#explorePanel {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
select {
  background: #162337;
  color: #d3e2f5;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  padding: 9px;
  min-width: 0;
}
#catalogType {
  width: 100%;
}
.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8ba0bb;
  font-size: 12px;
  margin: 18px 0 8px;
}
#results {
  flex: 1;
  overflow: auto;
  min-height: 75px;
  scrollbar-width: thin;
  scrollbar-color: #344a65 transparent;
}
.result {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: 0;
  border-radius: 8px;
  padding: 11px 6px;
  text-align: left;
  width: 100%;
}
.result:hover,
.result.active {
  background: #9bcfff10;
}
.object-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #ffffff15;
  background: #ffffff04;
  font-size: 18px;
  flex-shrink: 0;
}
.result span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.result strong {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result small {
  font-size: 12px;
  color: #7f94b0;
}
.result .arrow {
  margin-left: auto;
  font-size: 17px;
  color: #6b85a4;
}
.nearest {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 14px;
  flex-shrink: 0;
}
.nearest h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.nearest p {
  font-size: 12px;
  color: #7d93b0;
  margin: 6px 0 11px;
}
.nearest-row {
  display: flex;
  gap: 7px;
}
.nearest select {
  flex: 1;
  width: 40%;
}
.nearest button {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #8abde545;
  background: #28455f;
  border-radius: 7px;
  padding: 9px;
}
.catalog-footer {
  border-top: 1px solid var(--border);
  padding-top: 13px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6c839f;
  flex-shrink: 0;
}
#layersPanel {
  overflow: auto;
  scrollbar-width: thin;
  min-height: 0;
  flex: 1;
}
.layer-actions {
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
}
.layer-actions button {
  font-size: 12px;
  background: #ffffff06;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 6px;
}
.filter {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 0;
  font-size: 14px;
  cursor: pointer;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.count {
  font-size: 12px;
  color: #8199b7;
  margin-left: auto;
}
.filter input {
  appearance: none;
  position: relative;
  width: 30px;
  height: 17px;
  border-radius: 10px;
  background: #2b3748;
  cursor: pointer;
  flex-shrink: 0;
}
.filter input:after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #8395aa;
  transition: 0.15s;
}
.filter input:checked {
  background: #437194;
}
.filter input:checked:after {
  left: 15px;
  background: #c3e5ff;
}
.layer-options {
  padding-top: 15px;
  border-top: 1px solid var(--border);
  margin-top: 13px;
}
.layer-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 9px 0;
}
.layer-options input {
  accent-color: #a6d8ff;
}
.layer-options small {
  margin-left: auto;
  font-size: 11px;
  color: #8ca2bd;
  border: 1px solid var(--border);
  padding: 2px 4px;
  border-radius: 4px;
}
.catalog-toggle {
  position: fixed;
  left: 25px;
  top: 103px;
  z-index: 3;
  background: #142135dd;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 15px;
  font-size: 14px;
}
.scene-caption {
  position: fixed;
  top: 116px;
  left: 354px;
  pointer-events: none;
  z-index: 1;
  transition: left 0.2s;
  max-width: calc(100vw - 700px);
}
body.catalog-closed .scene-caption {
  left: 26px;
}
.eyebrow {
  font-size: 11px;
  color: #83b5e0;
  letter-spacing: 1.8px;
  font-weight: 600;
}
h1 {
  font-size: 34px;
  letter-spacing: -1px;
  line-height: 1.2;
  font-weight: 500;
  margin: 11px 0 9px;
  overflow-wrap: anywhere;
}
.scene-caption p {
  font-size: 13px;
  color: #8098b6;
  line-height: 1.6;
  margin: 0;
}
.detail {
  width: 300px;
  right: 24px;
  top: 104px;
  bottom: auto;
  max-height: calc(100dvh - 230px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 18px;
}
.detail .panel-heading > span {
  font-size: 12px;
  letter-spacing: 1.2px;
  color: #86b7df;
}
.detail h2 {
  font-size: 27px;
  letter-spacing: -0.6px;
  margin: 9px 0 10px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid #a6d8ff20;
  border-radius: 5px;
  font-size: 11px;
  color: #88a5c5;
  margin-bottom: 12px;
}
.detail p {
  font-size: 14px;
  color: #b3c2d6;
  line-height: 1.75;
  margin: 0 0 12px;
}
.detail dl {
  margin: 0 0 17px;
}
.detail dl div {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  border-bottom: 1px solid #ffffff0b;
  padding: 9px 0;
}
.detail dt {
  font-size: 12px;
  color: #8199b4;
}
.detail dd {
  margin: 0;
  font-size: 13px;
  text-align: right;
}
.primary,
.secondary {
  padding: 12px 13px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--border);
  background: #1b2b40;
  color: #c9e2fa;
}
.primary {
  background: #b5ddff;
  color: #10273e;
  font-weight: 700;
  border: 0;
}
.detail > .primary,
.detail > .secondary {
  width: 100%;
}
.detail-actions {
  display: flex;
  gap: 7px;
  margin: 8px 0;
}
.detail-actions button {
  width: 50%;
  font-size: 12px;
  padding: 10px 5px;
}
#sourceLink {
  display: block;
  font-size: 12px;
  color: #9cccf3;
  margin: 16px 0 9px;
  text-decoration: none;
}
.detail small {
  display: block;
  font-size: 11px;
  line-height: 1.7;
  color: #7790ad;
}
.view-options {
  position: fixed;
  right: 24px;
  bottom: 125px;
  z-index: 4;
  background: #101c2deb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13px;
  max-width: 270px;
}
.view-options summary {
  cursor: pointer;
  color: #aac4de;
}
.view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}
.view-grid button {
  border: 1px solid #ffffff12;
  background: #1b2a40;
  border-radius: 6px;
  padding: 9px;
  font-size: 12px;
}
footer {
  position: fixed;
  inset: auto 0 0;
  min-height: 105px;
  padding: 16px 27px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  z-index: 3;
  background: linear-gradient(transparent, #080f1cee 35%);
}
.scale-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 225px;
}
.scale-info small {
  font-size: 11px;
  color: #8fa6c2;
}
.scale-info strong {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.scale-info > span {
  font-size: 12px;
  color: #6884a4;
}
.zoom-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0d192bea;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 13px;
  width: 440px;
  max-width: 45vw;
}
.zoom-dock button {
  border: 0;
  background: #ffffff09;
  border-radius: 7px;
  width: 33px;
  height: 34px;
  flex-shrink: 0;
  font-size: 22px;
}
.zoom-track {
  flex: 1;
  min-width: 40px;
}
.zoom-track input {
  width: 100%;
  accent-color: #b5ddff;
  height: 4px;
  display: block;
  cursor: pointer;
}
.zoom-track > div {
  display: flex;
  justify-content: space-between;
  color: #7291b3;
  font-size: 10px;
  margin-top: 9px;
}
.gesture {
  font-size: 12px;
  color: #aec1da;
  line-height: 1.9;
  text-align: right;
}
.gesture small {
  font-size: 11px;
  color: #6c88a7;
  display: block;
}
.travel-status {
  position: fixed;
  left: 50%;
  bottom: 130px;
  transform: translateX(-50%);
  z-index: 5;
  border: 1px solid var(--border);
  background: #14263aee;
  border-radius: 30px;
  padding: 9px 10px 9px 18px;
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 13px;
}
.travel-status button {
  border: 0;
  background: #bfdfff;
  color: #163047;
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 12px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 185px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 15;
  padding: 12px 17px;
  background: #1e354dee;
  border: 1px solid #98cfff40;
  border-radius: 10px;
  font-size: 13px;
  max-width: 90vw;
  text-align: center;
}
#toast.show {
  opacity: 1;
}
.hidden {
  display: none !important;
}
#loading {
  position: fixed;
  inset: 0;
  background: #080e19;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
}
#loading h2 {
  font-size: 23px;
  font-weight: 500;
}
#loading p {
  color: #829cbb;
  font-size: 14px;
}
.loader {
  width: 45px;
  height: 45px;
  border: 1px solid #ffffff17;
  border-top-color: #a5d8ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  width: calc(100% - 32px);
  max-width: 840px;
  max-height: 90dvh;
  overflow: auto;
  background: #111e30;
  border: 1px solid #a2c5ec40;
  border-radius: 18px;
  color: #e6f2ff;
  padding: 27px;
  box-shadow: 0 30px 100px #000b;
}
dialog::backdrop {
  background: #01050ba8;
  backdrop-filter: blur(8px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.dialog-head h2 {
  font-weight: 500;
  font-size: 24px;
  margin: 8px 0;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.help-grid h3 {
  font-size: 16px;
  font-weight: 600;
}
.help-grid p {
  font-size: 14px;
  line-height: 1.8;
  color: #a4b8d1;
}
.keyboard-guide {
  padding: 12px;
  background: #ffffff05;
  border-radius: 8px;
}
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sources a {
  color: #98c7f0;
  font-size: 12px;
}
.muted {
  font-size: 12px;
  line-height: 1.8;
  color: #86a0bd;
}
#compareCanvas {
  width: 100%;
  height: 285px;
  display: block;
}
.comparison-names {
  display: flex;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}
.comparison-names span {
  width: 50%;
}
#comparisonFacts {
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  line-height: 1.9;
  font-size: 16px;
}
@media (max-width: 1100px) {
  .left {
    width: 280px;
    left: 18px;
  }
  .scene-caption {
    left: 325px;
    max-width: calc(100vw - 650px);
  }
  .detail {
    width: 278px;
    right: 18px;
  }
  header {
    padding: 0 18px;
  }
  nav .navbtn {
    padding: 10px 13px;
  }
  .gesture {
    display: none;
  }
  .zoom-dock {
    max-width: 55vw;
  }
  .scale-info {
    min-width: 190px;
  }
  h1 {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  header {
    height: 67px;
    padding: 0 15px;
  }
  .brand {
    font-size: 13px;
    gap: 7px;
    letter-spacing: 1.8px;
  }
  .brandmark {
    font-size: 30px;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 1.4px;
  }
  .version {
    font-size: 9px;
    padding: 3px 4px;
  }
  nav {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    max-width: 96vw;
  }
  nav .navbtn {
    font-size: 12px;
    padding: 9px 12px;
  }
  .header-actions {
    gap: 5px;
  }
  #language {
    font-size: 12px;
    padding: 6px;
  }
  .scene-caption,
  body.catalog-closed .scene-caption {
    top: 135px;
    left: 18px;
    max-width: calc(100vw - 35px);
  }
  h1 {
    font-size: 27px;
    margin: 9px 0 5px;
  }
  .scene-caption p {
    font-size: 12px;
    max-width: 270px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .left {
    top: 122px;
    left: 10px;
    bottom: 108px;
    width: calc(100vw - 20px);
    max-width: 360px;
    padding: 17px;
    z-index: 7;
  }
  .left:not(.open) {
    transform: translateX(-390px);
    opacity: 0;
    pointer-events: none;
  }
  .left.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .catalog-toggle {
    top: auto;
    bottom: 111px;
    left: 15px;
    font-size: 13px;
    padding: 10px 14px;
    z-index: 5;
  }
  .detail {
    left: 10px;
    right: 10px;
    top: auto;
    bottom: 108px;
    width: auto;
    max-height: 49dvh;
    z-index: 6;
    padding: 16px;
  }
  .detail h2 {
    font-size: 24px;
  }
  .detail p {
    font-size: 14px;
    line-height: 1.65;
  }
  .detail dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 17px;
  }
  .detail dl div {
    display: block;
  }
  .detail dd {
    text-align: left;
    margin-top: 3px;
  }
  .detail small {
    font-size: 11px;
  }
  .detail-actions button {
    font-size: 13px;
  }
  .detail:not(.hidden) ~ .view-options {
    display: none;
  }
  .view-options {
    bottom: 111px;
    right: 15px;
    font-size: 12px;
    padding: 10px;
  }
  .view-grid {
    max-width: 250px;
  }
  footer {
    padding: 10px 14px 14px;
    gap: 12px;
    min-height: 97px;
  }
  .scale-info {
    min-width: 105px;
    max-width: 39%;
    gap: 4px;
  }
  .scale-info small {
    font-size: 9px;
    line-height: 1.4;
  }
  .scale-info strong {
    font-size: 16px;
  }
  .scale-info > span {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .zoom-dock {
    width: auto;
    flex: 1;
    max-width: 61%;
    padding: 8px;
    gap: 6px;
  }
  .zoom-dock button {
    width: 27px;
    height: 31px;
    font-size: 19px;
  }
  .zoom-dock .fit {
    display: none;
  }
  .zoom-track > div {
    font-size: 8px;
  }
  .zoom-track > div span:last-child {
    display: none;
  }
  .travel-status {
    bottom: 165px;
    font-size: 12px;
    max-width: 95%;
    white-space: nowrap;
  }
  #toast {
    bottom: 210px;
    font-size: 12px;
    min-width: 200px;
  }
  .help-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dialog {
    padding: 20px;
  }
  .dialog-head h2 {
    font-size: 21px;
  }
  #compareCanvas {
    height: 230px;
  }
  .comparison-names {
    font-size: 13px;
  }
}
@media (max-height: 650px) {
  .left {
    overflow: auto;
  }
  .left #explorePanel {
    min-height: 350px;
  }
  .detail {
    max-height: calc(100dvh - 195px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
  .loader {
    animation: none;
  }
  .left,
  #toast {
    transition: none;
  }
}

@media (min-width: 761px) {
  .view-options {
    left: 354px;
    right: auto;
  }
  body.catalog-closed .view-options {
    left: 25px;
  }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .view-options {
    left: 325px;
  }
}

#focusText {
  border: 0;
  background: transparent;
  color: #93bbdd;
  padding: 0;
  text-align: left;
  font-size: 11px;
  cursor: pointer;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#focusText:hover {
  color: #d7eeff;
  text-decoration: underline;
}
.focus-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #d0e6fa;
}
.focus-option input {
  accent-color: #aedbff;
}
.focus-note {
  font-size: 11px;
  line-height: 1.6;
  color: #93a9c3;
  margin: 8px 0 0;
}
#centerSelected {
  margin-bottom: 8px;
}
@media (max-width: 760px) {
  #focusText {
    font-size: 9px;
    max-width: 100%;
  }
  .header-actions .iconbtn {
    width: 28px;
  }
  .view-options[open] {
    max-height: 60dvh;
    overflow: auto;
  }
}
/* Cosmic Lab 3.0 */
#compareDialog {
  max-width: 1060px;
  width: calc(100% - 28px);
  padding: 0;
  background: #0b1422;
  border-color: #b5d8ff38;
  scrollbar-width: thin;
}
#compareDialog::backdrop {
  background: #01050de6;
  backdrop-filter: blur(12px);
}
.lab-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 24px 28px 18px;
  background: #101d2e;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
.lab-heading h2 {
  font-size: 25px;
  font-weight: 550;
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.lab-heading h2 span {
  color: #8baccb;
  font-weight: 400;
}
.lab-heading .iconbtn {
  flex-shrink: 0;
}
.lab-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
}
.lab-tabs {
  display: flex;
  gap: 5px;
}
.lab-toolbar button,
.lab-view-controls button,
.impact-presets button {
  font-size: 14px;
  border: 1px solid #a0c7f326;
  background: #17283c;
  border-radius: 8px;
  padding: 10px 12px;
}
.lab-tabs button.active {
  background: #b9dfff;
  color: #10263b;
}
.lab-toolbar label {
  font-size: 14px;
  color: #95adc6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-toolbar select,
.impact-controls select,
.impact-controls input[type='number'] {
  color: #e3f1ff;
  background: #111f31;
  border: 1px solid #a2caf536;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  max-width: 100%;
}
.lab-size,
.lab-impact {
  padding: 20px 28px 28px;
}
.lab-viewport {
  position: relative;
  border: 1px solid #9ac7ee22;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 25% 45%, #25426545, transparent 40%),
    radial-gradient(ellipse at 75% 45%, #493d2645, transparent 40%), #050b14;
}
.lab-viewport #compareCanvas {
  height: 330px;
  width: 100%;
  touch-action: none;
  cursor: grab;
}
.lab-view-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.lab-view-controls button {
  pointer-events: auto;
  background: #102033dd;
  font-size: 12px;
}
.lab-object-labels {
  position: absolute;
  bottom: 14px;
  inset-inline: 0;
  display: flex;
  pointer-events: none;
}
.lab-object-labels > span {
  width: 50%;
  text-align: center;
  font-size: 15px;
  overflow-wrap: anywhere;
  padding: 0 12px;
}
.lab-object-labels small {
  display: block;
  color: #8ba8c4;
  font-size: 12px;
  margin-top: 5px;
}
.lab-scale-note,
.lab-basis {
  font-size: 13px;
  line-height: 1.6;
  color: #8ca6c2;
  margin: 12px 0 18px;
}
.lab-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.lab-metrics > div {
  padding: 17px 13px;
  border: 1px solid #a2caf524;
  border-radius: 10px;
  background: linear-gradient(145deg, #142439, #0e1928);
}
.lab-metrics span {
  display: block;
  color: #92acc7;
  font-size: 12px;
  line-height: 1.5;
  min-height: 36px;
}
.lab-metrics strong {
  display: block;
  font-size: 22px;
  font-weight: 550;
  color: #d2e9ff;
  overflow-wrap: anywhere;
  margin-top: 5px;
}
.lab-metrics small {
  font-size: 12px;
  color: #88a9ca;
  font-weight: 400;
}
.lab-properties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 30px;
  margin: 16px 0;
}
.lab-properties > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid #bed9ff14;
  font-size: 14px;
}
.lab-properties span {
  color: #91a9c3;
}
.lab-properties strong {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}
.color-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  box-shadow: 0 0 9px currentColor;
}
.lab-explanation {
  font-size: 14px;
  line-height: 1.8;
  color: #9ab0c9;
  margin: 20px 0 10px;
}
.lab-source {
  color: #9cd2ff;
  font-size: 13px;
  text-decoration: none;
}
.impact-intro h3 {
  font-size: 23px;
  font-weight: 500;
  margin: 4px 0 8px;
}
.impact-intro p {
  font-size: 14px;
  color: #8ea8c3;
  line-height: 1.7;
}
.impact-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 17px 0 22px;
}
.impact-presets button {
  border-color: #eabc7940;
  color: #e8c399;
  background: #30291e66;
}
.impact-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 27px;
  margin-bottom: 22px;
}
.impact-controls label {
  display: block;
  font-size: 14px;
  color: #b2c8dd;
  margin-bottom: 17px;
}
.impact-controls label > input,
.impact-controls label > select {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.impact-controls input[type='range'] {
  accent-color: #edbc86;
}
.impact-controls output {
  float: right;
  color: #ffcb92;
}
.impact-controls .muted {
  font-size: 12px;
}
#impact-outcome .badge {
  color: #deb788;
  border-color: #dfae673b;
}
#impact-outcome h3 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 500;
  color: #ffcb95;
  margin: 5px 0 12px;
}
#impact-outcome p {
  font-size: 14px;
  line-height: 1.7;
  color: #b5c4d5;
}
#impact-chart {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #b7d0ef20;
  margin-top: 15px;
}
#catalogSort {
  width: 100%;
  margin: 9px 0 3px;
  background: #0e1b2a;
  color: #b5cbe1;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .lab-heading {
    padding: 19px 16px 15px;
  }
  .lab-heading h2 {
    font-size: 21px;
  }
  .lab-toolbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .lab-size,
  .lab-impact {
    padding: 16px;
  }
  .lab-toolbar label {
    width: 100%;
    justify-content: space-between;
  }
  .lab-toolbar select {
    min-width: 140px;
  }
  .lab-viewport #compareCanvas {
    height: 290px;
  }
  .lab-view-controls {
    flex-wrap: wrap;
  }
  .lab-view-controls button {
    font-size: 11px;
    padding: 8px;
  }
  .lab-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .lab-properties {
    grid-template-columns: 1fr;
  }
  .impact-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .impact-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 15px;
  }
  .impact-controls .muted {
    grid-column: 1/-1;
  }
  .impact-controls label {
    font-size: 13px;
  }
  .lab-metrics strong {
    font-size: 20px;
  }
  .lab-object-labels > span {
    font-size: 13px;
  }
  .impact-presets button {
    font-size: 12px;
  }
  .lab-tabs button {
    font-size: 13px;
  }
}
