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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
}

.landing-page {
  background: #111418;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: clamp(28px, 6vw, 72px);
}

.landing-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.42);
}

.landing-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  align-items: start;
}

.landing-copy h1 {
  font-size: clamp(40px, 8vw, 92px);
  line-height: 0.96;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
}

.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 6px;
  background: rgba(244, 247, 251, 0.92);
  color: #111418;
  font-weight: 700;
  text-decoration: none;
  padding: 0 18px;
}

.landing-button:hover {
  background: #ffffff;
}

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

#viewport {
  min-width: 0;
  background: #15191f;
}

#panel {
  overflow: auto;
  border-left: 1px solid #2d3642;
  background: #1b2027;
  padding: 18px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  margin-top: 22px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #b8c4d4;
  text-transform: uppercase;
}

#status {
  margin-top: 6px;
  color: #91a2b8;
  font-size: 13px;
}

.model-picker {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.model-picker span {
  color: #98a8bb;
  font-size: 12px;
}

.model-picker select {
  min-height: 38px;
  border: 1px solid #3a4553;
  border-radius: 6px;
  background: #242b34;
  color: #f4f7fb;
  font: inherit;
  padding: 0 10px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}

button,
.toolbar label {
  min-height: 38px;
  border: 1px solid #3a4553;
  border-radius: 6px;
  background: #242b34;
  color: #f4f7fb;
  font: inherit;
}

button {
  cursor: pointer;
}

.tool-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.toolbar label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.readout div,
.source-readout {
  border: 1px solid #303946;
  border-radius: 6px;
  padding: 10px;
  background: #20262e;
}

.readout span,
.slider span,
.source-readout span {
  display: block;
  color: #98a8bb;
  font-size: 12px;
}

.readout strong,
.source-readout strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.source-readout strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.button-grid button {
  min-width: 0;
  padding: 0 8px;
  overflow-wrap: anywhere;
}

.button-grid button.active {
  border-color: #81b8ff;
  background: #22354c;
}

.lift-buttons {
  margin-bottom: 0;
}

.slider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 6px 10px;
  align-items: center;
  margin-bottom: 12px;
}

.slider span {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.slider input {
  width: 100%;
}

.slider output {
  color: #d7e1ee;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 12px;
}

.tuner-grid {
  display: grid;
  gap: 10px;
}

.tool-picker {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.tool-picker span {
  color: #98a8bb;
  font-size: 12px;
}

.tool-picker select {
  min-height: 36px;
  border: 1px solid #3a4553;
  border-radius: 6px;
  background: #242b34;
  color: #f4f7fb;
  font: inherit;
  padding: 0 10px;
}

.tuner-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
}

.tuner-row span {
  color: #98a8bb;
  font-size: 12px;
}

.tuner-row input[type="range"] {
  width: 100%;
}

.tuner-row input[type="number"] {
  width: 72px;
  min-height: 32px;
  border: 1px solid #3a4553;
  border-radius: 6px;
  background: #242b34;
  color: #f4f7fb;
  font: inherit;
  font-size: 12px;
  padding: 0 6px;
}

.rotation-buttons,
.axis-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.axis-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rotation-buttons button,
.axis-buttons button {
  min-height: 34px;
  font-size: 12px;
}

#alignmentToolOutput {
  margin: 10px 0 0;
  border: 1px solid #303946;
  border-radius: 6px;
  background: #12161c;
  color: #d7e1ee;
  font-size: 11px;
  line-height: 1.45;
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

#markerList {
  display: grid;
  gap: 8px;
}

.marker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #303946;
  border-radius: 6px;
  padding: 8px 10px;
  color: #d7e1ee;
  background: #20262e;
  font-size: 12px;
}

@media (max-width: 860px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) 44vh;
  }

  #panel {
    border-left: 0;
    border-top: 1px solid #2d3642;
  }
}
