*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: #10141c;
  color: #e7edf5;
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

#app {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 64px 1fr;
  height: 100%;
  min-height: 0;
}

header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid #2a3342;
  background: #141a24;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  width: 28px;
  height: 28px;
  color: #e0a36a;
}

h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: 0.01em;
}

.brand p {
  margin: 1px 0 0;
  color: #8e9aab;
  font-size: 12px;
}

aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 18px 18px 16px;
  border-right: 1px solid #2a3342;
  background: #151b25;
}

.file-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 6px;
  background: #e0a36a;
  color: #1b140d;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.file-btn:hover {
  background: #ebba86;
}

.file-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.stats {
  display: grid;
  gap: 10px;
  margin: 0;
}

.stats div {
  min-width: 0;
}

.stats dt {
  margin: 0;
  color: #8e9aab;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats dd {
  margin: 2px 0 0;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d5dde8;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  width: 16px;
  height: 16px;
  accent-color: #e0a36a;
}


.section-label {
  margin: 0 0 8px;
  color: #8e9aab;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dimensions-section {
  display: grid;
  gap: 8px;
}

.rotate-section {
  display: flex;
  flex-direction: column;
}

.rotate-axes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

#rotate-x:hover {
  border-color: #e06060;
  color: #f0a8a8;
}

#rotate-y:hover {
  border-color: #4cbc6a;
  color: #9be0ae;
}

#rotate-z:hover {
  border-color: #4a8fe0;
  color: #9bc0f0;
}

.pick-section {
  display: grid;
  gap: 8px;
}

#pick-point.is-active {
  border-color: #e0b04a;
  color: #f0d090;
  background: #2a2418;
}

#stage.is-picking {
  cursor: crosshair;
}

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

button {
  height: 36px;
  border: 1px solid #3a4658;
  border-radius: 6px;
  background: #1c2430;
  color: #e7edf5;
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: #e0a36a;
  color: #f3d7b8;
}

.status {
  min-height: 1.45em;
  margin: 0;
  color: #9eb0a6;
  font-size: 13px;
}

.status.is-error {
  color: #f0a3a0;
}

.privacy {
  margin: auto 0 0;
  color: #7e8b9c;
  font-size: 12px;
}

#stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #10141c;
}

#view {
  display: block;
  width: 100%;
  height: 100%;
}

.empty,
.drop-hint {
  position: absolute;
  pointer-events: none;
}

.empty {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  color: #8e9aab;
  text-align: center;
}

.empty[hidden] {
  display: none;
}

.empty-title {
  margin: 0;
  color: #d5dde8;
  font-size: 20px;
}

.empty p {
  max-width: 360px;
  margin: 0;
}

.drop-hint {
  inset: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #e0a36a;
  border-radius: 12px;
  background: rgba(16, 20, 28, 0.72);
  color: #f3d7b8;
  font-size: 22px;
}

.drop-hint[hidden] {
  display: none;
}

@media (max-width: 760px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(280px, 1fr);
  }

  aside {
    border-right: 0;
    border-bottom: 1px solid #2a3342;
  }

  .privacy {
    margin-top: 4px;
  }
}

button.secondary {
  background: transparent;
  border-style: dashed;
  opacity: 0.9;
}
