:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #111418;
  color: #eef2f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
}

#app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  width: 100vw;
  height: 100vh;
}

#viewer {
  position: relative;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    #15191f;
}

#panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #1c2128;
  overflow: auto;
}

h1 {
  margin: 0 0 2px;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 7px;
  color: #cbd4d9;
  font-size: 13px;
}

select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 0 10px;
  background: #11161c;
  color: #f4f7f8;
  font: inherit;
}

.check {
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 9px;
}

.check input {
  width: 16px;
  height: 16px;
}

#readout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9daab3;
}

.dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  background: var(--dot-color);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
}

dd {
  margin: 0;
  color: #f2f5f6;
  text-align: right;
}

.label {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(17, 20, 24, 0.78);
  color: #f8fbfc;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

@media (max-width: 780px) {
  body {
    overflow: auto;
  }

  #app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(420px, 68vh) auto;
    height: auto;
    min-height: 100vh;
  }

  #panel {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .label {
    padding: 2px 5px;
    font-size: 10px;
    line-height: 1.1;
  }
}
