body {
  font-family: "Inter", sans-serif;
  color: #f5f7fa;
}

.font-headline {
  font-family: "Space Grotesk", sans-serif;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.scene-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  color: rgba(245, 247, 250, 0.9);
  font-size: 11px;
  transition: background-color 160ms ease, color 160ms ease;
}

.scene-item:hover {
  background: rgba(35, 38, 42, 0.92);
}

.scene-chip {
  margin-left: auto;
  border: 1px solid rgba(255, 209, 102, 0.32);
  color: #ffd166;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.scene-chip-muted {
  color: #a9abaf;
  border-color: rgba(116, 117, 121, 0.28);
}

.scene-footer-row {
  display: flex;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 11px;
  color: #c8d0d8;
}

.scene-footer-row:hover {
  color: #eff3f7;
  background: rgba(29, 32, 36, 0.96);
}

.hud-icon-button {
  color: #d7dde4;
  transition: color 160ms ease, transform 160ms ease, background-color 160ms ease;
  padding: 0.125rem;
  border-radius: 0.375rem;
}

.hud-icon-button:hover {
  color: #ffd166;
  background: rgba(35, 38, 42, 0.85);
}

.hud-icon-button:active {
  transform: scale(0.96);
}

.panel-section {
  padding: 1rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.panel-heading-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f9f9fd;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.field-label {
  font-size: 10px;
  color: #eef3f8;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.field-input-shell {
  min-width: 8.6rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.78);
  padding: 0.48rem 0.6rem;
  border-radius: 0.375rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.field-input-shell:focus-within {
  border-color: rgba(255, 209, 102, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.24), 0 10px 20px rgba(0, 0, 0, 0.14);
}

.dimension-input {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  color: #050607;
  -webkit-text-fill-color: #050607;
  opacity: 1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  font-family: "Space Grotesk", sans-serif;
  text-align: right;
  color-scheme: dark;
  letter-spacing: 0.03em;
}

.dimension-input::placeholder {
  color: rgba(5, 6, 7, 0.7);
  -webkit-text-fill-color: rgba(5, 6, 7, 0.7);
}

.dimension-input:focus {
  outline: none;
  box-shadow: none;
}

.dimension-input::selection {
  background: rgba(255, 209, 102, 0.35);
}

.dimension-input::-webkit-outer-spin-button,
.dimension-input::-webkit-inner-spin-button {
  margin: 0;
}

.field-unit {
  color: #050607;
  font-size: 10px;
  font-weight: 700;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-card {
  background: rgba(18, 21, 25, 0.96);
  border: 1px solid rgba(151, 157, 166, 0.18);
  border-radius: 0.5rem;
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 9px;
  font-family: monospace;
  text-transform: uppercase;
}

.panel-open {
  transform: translateY(0);
}

.mobile-panel-toggle {
  position: fixed;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mobile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 17, 21, 0.88);
  border: 1px solid rgba(255, 209, 102, 0.22);
  color: #ffd166;
  font-size: 10px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mobile-edit-button {
  position: absolute;
  right: 1rem;
  bottom: 1.2rem;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  background: rgba(255, 209, 102, 0.96);
  color: #211600;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.24);
}

.mobile-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.mobile-sheet-handle {
  width: 3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0.7rem auto 0;
}

.mobile-note {
  margin-bottom: 0.8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.5rem;
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.18);
  color: #eef3f8;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 767px) {
  #mobile-controls-toggle:checked ~ .app-shell #mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  #mobile-controls-toggle:checked ~ .app-shell #properties-panel {
    transform: translateY(0);
  }

  #properties-panel {
    backdrop-filter: blur(18px);
    background: rgba(17, 20, 23, 0.97);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
  }

  .panel-section {
    padding: 1rem 1rem 1.15rem;
  }

  .panel-heading {
    margin-bottom: 0.85rem;
  }

  .field-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.42rem;
  }

  .field-input-shell {
    width: 100%;
    min-width: 0;
    padding: 0.62rem 0.72rem;
  }

  .field-label {
    font-size: 12px;
  }

  .panel-title {
    font-size: 11px;
  }

  .mobile-note {
    font-size: 12px;
    line-height: 1.5;
  }

  .mobile-edit-button {
    bottom: 1rem;
    right: 0.9rem;
    padding: 0.82rem 1.05rem;
    font-size: 11px;
  }
}
