* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #eef2f7;
  background: #081016;
}

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

.social-tag {
  position: fixed;
  z-index: 2;
  top: 16px;
  left: 50%;
  max-width: calc(100vw - 32px);
  padding: 0;
  transform: translateX(-50%);
  color: rgb(238 242 247 / 90%);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 4px rgb(0 0 0 / 72%);
  white-space: nowrap;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.model-loading {
  position: fixed;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
  pointer-events: none;
}

.model-loading.is-complete {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.model-loading span {
  display: block;
  color: #ffffff;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
}

.panel {
  position: fixed;
  top: 18px;
  left: 18px;
  width: min(320px, calc(100vw - 36px));
  padding: 16px;
  border: 1px solid rgb(226 239 255 / 18%);
  border-radius: 8px;
  background: rgb(8 16 22 / 78%);
  box-shadow: 0 18px 42px rgb(0 0 0 / 24%);
  backdrop-filter: blur(14px);
}

#app[data-ui-panels="hidden"] .panel {
  display: none;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

h2,
h3,
p {
  margin: 0;
}

h2 {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 720;
}

h3 {
  margin-bottom: 8px;
  color: #dce6ef;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
  text-transform: uppercase;
}

p {
  margin-top: 3px;
  color: #9fb0bf;
  font-size: 13px;
}

button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 34px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 6px;
  color: #eef2f7;
  background: #315a63;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

button:hover {
  background: #3e707b;
}

button:disabled {
  color: #78909d;
  background: rgb(49 90 99 / 38%);
  cursor: not-allowed;
}

button:disabled:hover {
  background: rgb(49 90 99 / 38%);
}

.playback-controls {
  display: grid;
  grid-template-columns: 1fr 84px;
  gap: 10px;
  margin-bottom: 12px;
}

.toggle-button[aria-pressed="true"] {
  background: #7c4e56;
}

.toggle-button[aria-pressed="true"]:hover {
  background: #935f68;
}

label {
  display: grid;
  grid-template-columns: 88px 1fr 42px;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: #dce6ef;
  font-size: 13px;
}

output {
  color: #9fb0bf;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  width: 100%;
  accent-color: #61d394;
}

.camera-panel {
  top: auto;
  bottom: 18px;
  width: auto;
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.camera-panel .panel-header {
  margin-bottom: 0;
}

.copy-status {
  min-height: 18px;
  margin-top: 10px;
  color: #61d394;
  font-size: 12px;
}

.copy-status:empty {
  display: none;
}

@media (max-width: 620px) {
  .social-tag {
    top: 76px;
    font-size: 11px;
  }

  .panel {
    top: 12px;
    left: 12px;
    width: calc(100vw - 24px);
    padding: 12px;
  }

  h2 {
    font-size: 19px;
  }

  label {
    grid-template-columns: 78px 1fr 38px;
    gap: 8px;
  }

  .camera-panel {
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: min(48vh, 380px);
  }
}
