.earth-sky-lab {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #080f1b;
  color: #dbe8f2;
  overflow: hidden;
}
.earth-sky-lab[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.sky-header {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid #254554;
  background: #0c1823;
}
.sky-header h2 {
  font-size: 24px;
  margin: 3px 0;
}
.sky-header small {
  color: #8de0d4;
  letter-spacing: 0.14em;
  font-size: 12px;
}
.earth-sky-lab button,
.earth-sky-lab select,
.earth-sky-lab input:not([type='checkbox']) {
  min-height: 44px;
  border: 1px solid #2d4a60;
  border-radius: 9px;
  background: #111f30;
  color: #e2edf7;
  font: inherit;
  padding: 9px 12px;
  box-sizing: border-box;
}
.earth-sky-lab button:hover {
  border-color: #7cd8d3;
  background: #163143;
}
.earth-sky-lab button:focus-visible,
.earth-sky-lab select:focus-visible,
.earth-sky-lab input:focus-visible,
.earth-sky-lab canvas:focus-visible {
  outline: 2px solid #deb0ff;
  outline-offset: -3px;
}
.sky-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 0;
}
.sky-stage {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.sky-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.sky-sidebar {
  position: static;
  overflow: auto;
  padding: 20px;
  background: #0b1523;
  border-left: 1px solid #254050;
  font-size: 14px;
  min-width: 0;
}
.sky-sidebar h3 {
  font-size: 15px;
  margin: 0 0 14px;
}
.sky-sidebar section {
  padding: 0 0 22px;
  margin-bottom: 20px;
  border-bottom: 1px solid #213646;
}
.sky-sidebar label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 11px 0;
  min-height: 32px;
}
.sky-sidebar label:has(select),
.sky-sidebar label:has(input:not([type='checkbox'])) {
  display: grid;
  grid-template-columns: 1fr;
}
.sky-sidebar input,
.sky-sidebar select {
  width: 100%;
  min-width: 0;
}
.sky-sidebar input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: #85d6c9;
}
.sky-sidebar p {
  line-height: 1.65;
}
.sky-tools {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
}
.sky-tools button {
  background: #0b192ddd;
  backdrop-filter: blur(10px);
  min-width: 44px;
}
.sky-tools [aria-pressed='true'] {
  border-color: #e09ee8;
  color: #ffb8f0;
}
.sky-status {
  position: absolute;
  bottom: 18px;
  left: 20px;
  right: 20px;
  margin: 0;
  font-size: 13px;
  color: #9ab3c9;
  pointer-events: none;
  text-shadow: 0 2px 5px #000;
}
.sky-status button {
  pointer-events: auto;
}
.sky-star-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sky-member-list {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  max-height: 260px;
  overflow: auto;
}
.sky-member-list button {
  text-align: left;
}
.sky-note {
  font-size: 12px;
  color: #91a9bf;
  line-height: 1.7;
}
.sky-note a {
  color: #8dd8d3;
}
.sky-reset {
  width: 100%;
  margin: 18px 0 0;
}
.earth-sky-lab::backdrop {
  background: #030610;
}
.earth-sky-lab summary {
  cursor: pointer;
  min-height: 44px;
  line-height: 44px;
}
@media (max-width: 760px) {
  .sky-header {
    padding: 12px 15px;
  }
  .sky-header h2 {
    font-size: 20px;
  }
  .sky-header small {
    font-size: 10px;
  }
  .sky-body {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  .sky-stage {
    flex: 0 0 55dvh;
    min-height: 320px;
  }
  .sky-sidebar {
    overflow: visible;
    border-left: 0;
    border-top: 1px solid #254050;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 16px;
  }
  .sky-sidebar section {
    margin: 0;
  }
  .sky-sidebar details,
  .sky-sidebar .sky-note,
  .sky-reset {
    grid-column: 1/-1;
  }
  .sky-tools {
    top: 12px;
    left: 12px;
  }
  .sky-tools button {
    font-size: 13px;
  }
  .sky-status {
    font-size: 11px;
    bottom: 12px;
    left: 12px;
  }
  .sky-sidebar section label {
    font-size: 13px;
  }
}
@media (max-width: 390px) {
  .sky-sidebar {
    grid-template-columns: 1fr;
  }
}
