:root {
  color-scheme: dark;
  font:
    14px/1.5 system-ui,
    sans-serif;
  color: #f7f7f3;
  background: #070a12;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  grid-template-rows: 60px minmax(0, 1fr);
}
.top {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  border-bottom: 1px solid #253044;
}
@font-face {
  font-family: "Hubot Sans";
  font-weight: 200 900;
  font-display: swap;
  src: url("../vendor/fonts/hubot-sans.woff2") format("woff2");
}
.top .brand {
  font-family: "Hubot Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: #f7f7f3;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.top .brand .v {
  color: #6e8bff;
}
.top .brand .o {
  color: #ff6b35;
}
.local {
  margin-left: auto;
  font-size: 12px;
  color: #b3bfd2;
}
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 400px;
  overflow: hidden;
  background: #050912;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: contain;
}
.stage-label {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: grid;
  gap: 4px;
  pointer-events: none;
}
#scene-name {
  font-size: 19px;
  font-weight: 600;
}
#sound-label {
  font-size: 12px;
  color: #a9b8ce;
}
.motion {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: #101829cc;
}
.controls {
  border-left: 1px solid #253044;
  padding: 22px 18px;
  overflow-y: auto;
  max-height: calc(100svh - 60px);
}
button,
select {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #354360;
  border-radius: 7px;
  color: inherit;
  background: #141c2b;
  font: inherit;
  cursor: pointer;
}
button:hover:not(:disabled) {
  background: #25334c;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button[aria-pressed='true'] {
  background: #173bff;
  border-color: #8da3ff;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #94a9ff;
  outline-offset: 3px;
}
fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0 0 24px;
}
legend {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aabc4;
  padding: 0;
  margin-bottom: 10px;
}
.scene-choices,
.sound-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.scene-choices {
  grid-template-columns: 1fr 1fr;
}
#file {
  grid-column: 1/-1;
}
#status {
  overflow-wrap: anywhere;
  color: #b5c3d9;
  font-size: 12px;
  min-height: 2.8em;
  margin: 12px 0;
}
#status[data-error='true'] {
  color: #ffc2cd;
}
label {
  display: block;
  margin-bottom: 16px;
  font-size: 13px;
}
select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
output {
  float: right;
  color: #9aabc4;
  font-variant-numeric: tabular-nums;
}
input[type='range'] {
  width: 100%;
  height: 32px;
  margin: 2px 0 0;
  accent-color: #5876ff;
  cursor: pointer;
}
body:has(.stage:fullscreen) .stage {
  width: 100vw;
  height: 100vh;
}
.stage:fullscreen .stage-label,
.stage:fullscreen .motion {
  opacity: 0;
  transition: opacity 0.15s;
}
.stage:fullscreen.controls-awake .motion,
.stage:fullscreen .motion:focus-visible {
  opacity: 1;
}
@media (max-width: 700px) {
  main {
    grid-template-columns: 1fr;
    grid-template-rows: 56px minmax(280px, 44svh) auto;
  }
  .top {
    padding: 6px 12px;
    gap: 8px;
  }
  .top .brand {
    font-size: 17px;
  }
  .local {
    display: none;
  }
  .top button {
    margin-left: auto;
  }
  .stage {
    min-height: 280px;
  }
  .stage-label {
    left: 14px;
    bottom: 16px;
    max-width: 48%;
  }
  #sound-label {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .motion {
    right: 12px;
    bottom: 12px;
  }
  .controls {
    border-left: 0;
    border-top: 1px solid #253044;
    max-height: none;
    padding: 18px;
  }
  .scene-choices {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .sound-choices {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
