@import url('data:text/css,');
:root {
  color-scheme: dark;
  --bg: #171c20;
  --panel: #20272b;
  --line: #354045;
  --text: #f1eddf;
  --muted: #a8b1b0;
  --mint: #b4dbc5;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}
button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 6px;
  padding: 9px 12px;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #ffffff0d;
  border-color: #65736e;
}
.topbar {
  height: 83px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  letter-spacing: -0.4px;
}
.brand b {
  font-weight: 400;
  color: var(--muted);
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--mint);
  color: var(--bg);
  width: 31px;
  height: 31px;
  border-radius: 10px;
  font-size: 25px;
}
.slash {
  color: #72807e;
  margin: 0 5px;
}
.status {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 9px;
}
.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71807f;
}
.status.connected i {
  background: var(--mint);
  box-shadow: 0 0 12px #b4dbc54d;
}
.status.connected {
  color: var(--mint);
}
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: calc(100svh - 124px);
}
.stage {
  position: relative;
  overflow: hidden;
  background: #dedbce;
  min-height: 720px;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
.stage-heading {
  position: absolute;
  top: 36px;
  left: 38px;
  pointer-events: none;
  color: #283a34;
}
.eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.8px;
  color: var(--muted);
}
.stage-heading .eyebrow {
  color: #586b5d;
}
h1 {
  font: normal clamp(31px, 3.8vw, 55px) / 1.04 var(--serif);
  letter-spacing: -1.6px;
  margin: 15px 0 12px;
}
.stage-heading p {
  font-size: 12px;
  color: #667367;
  margin: 0;
}
.stage-tools {
  position: absolute;
  top: 30px;
  right: 24px;
  display: flex;
  gap: 7px;
  flex-direction: column;
  align-items: flex-end;
}
.icon-button {
  background: #eeeee2c9;
  border-color: #4d665124;
  color: #344a3d;
  font-size: 11px;
  padding: 8px 11px;
  backdrop-filter: blur(12px);
}
.icon-button:hover {
  background: #f4f3e8;
}
.stage-bottom {
  position: absolute;
  bottom: 23px;
  left: 30px;
  right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #506357;
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 600;
}
.stage-bottom > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.live-dot {
  width: 5px;
  height: 5px;
  background: #60816b;
  border-radius: 50%;
}
.orbit-hint {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}
.orbit-hint em {
  margin: 0 7px;
  font-style: normal;
}
#loading {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #344a3d;
  background: #dedbcebd;
  font-size: 13px;
  backdrop-filter: blur(3px);
}
#loading.hidden {
  display: none;
}
.loader {
  width: 20px;
  height: 20px;
  border: 2px solid #82928144;
  border-top-color: #45664e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
aside {
  padding: 27px 25px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  font-size: 12px;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 21px;
}
h2 {
  font: normal 26px/1.2 var(--serif);
  letter-spacing: -0.5px;
  margin: 8px 0 0;
}
.text-button {
  padding: 4px 0;
  font-size: 11px;
  color: var(--mint);
  border: 0;
}
.input-choice {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px;
  border-radius: 8px;
}
.input-choice button {
  border: 0;
  font-size: 11px;
  color: var(--muted);
  padding: 10px 3px;
}
.input-choice button[aria-pressed='true'] {
  background: var(--mint);
  color: #1f3529;
}
.input-hint {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  min-height: 32px;
  margin: 11px 0 22px;
}
.control-section {
  border-top: 1px solid var(--line);
  padding: 19px 0;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}
.section-title h3 {
  font-size: 12px;
  margin: 0;
  font-weight: 500;
}
.section-title > span {
  font-size: 8px;
  letter-spacing: 1.6px;
  color: #84938e;
}
.pose-row {
  display: grid;
  grid-template-columns: 47px 1fr 43px;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
}
.pose-row label {
  font-size: 11px;
  color: var(--muted);
}
.pose-row output {
  font-family: Consolas, monospace;
  font-size: 11px;
  text-align: right;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
input[type='range'] {
  width: 100%;
  margin: 0;
  height: 15px;
  background: transparent;
  accent-color: var(--mint);
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 3px;
  background: #4a5758;
  border-radius: 3px;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  margin-top: -5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--mint);
  border: 2px solid var(--panel);
}
input[type='range'] {
  -webkit-appearance: none;
}
.blink-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
  margin-top: 18px;
}
.blink-buttons button {
  font-size: 10px;
  padding: 9px 2px;
  color: #cbd5ce;
}
.blink-buttons button.active {
  background: var(--mint);
  color: #21392a;
}
.feel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 0;
}
.feel summary {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
}
.feel summary::-webkit-details-marker {
  display: none;
}
.feel summary span {
  font-size: 13px;
  color: var(--muted);
}
.feel[open] summary span {
  transform: rotate(45deg);
}
.feel-content {
  padding-top: 18px;
}
.seg-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}
.segments {
  display: flex;
  background: var(--bg);
  border-radius: 5px;
  padding: 3px;
}
.segments button {
  padding: 5px 10px;
  font-size: 9px;
  border: 0;
  color: var(--muted);
}
.segments button[aria-pressed='true'] {
  background: #3b4c45;
  color: var(--mint);
}
.micro {
  font-size: 9px;
  line-height: 1.5;
  color: #8b9b95;
  margin: 8px 0 19px;
}
.tuning {
  display: grid;
  grid-template-columns: 1fr auto;
  font-size: 10px;
  color: var(--muted);
  margin: 16px 0;
}
.tuning output {
  font-family: Consolas, monospace;
  color: #c3d2ca;
}
.tuning input {
  grid-column: 1/-1;
  margin-top: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 17px;
}
.check input {
  accent-color: var(--mint);
  margin: 0;
}
.controller-guide {
  border-top: 1px solid var(--line);
  padding-top: 19px;
  margin-top: 21px;
}
.guide-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.guide-title .eyebrow {
  font-size: 8px;
  letter-spacing: 1.3px;
}
.guide-title > span:last-child {
  font-size: 8px;
  color: #7e9087;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 6px;
  font-size: 9px;
  color: var(--muted);
}
.guide-grid > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
kbd {
  font:
    8px Arial,
    sans-serif;
  display: inline-flex;
  min-width: 25px;
  justify-content: center;
  padding: 4px;
  border: 1px solid #4e5b59;
  border-radius: 4px;
  color: #d5ded5;
  white-space: nowrap;
}
.a-key {
  color: #b1d3a5;
}
.y-key {
  color: #d9cb8e;
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 15px 34px;
  font-size: 9px;
  color: #8b9a93;
  border-top: 1px solid var(--line);
}
.dark-stage .stage-heading,
.dark-stage .stage-bottom {
  color: #d8dfcf;
}
.dark-stage .stage-heading .eyebrow,
.dark-stage .stage-heading p {
  color: #9eafa2;
}
@media (min-width: 1500px) {
  main {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
  aside {
    padding: 32px;
  }
  .stage-heading {
    top: 44px;
    left: 48px;
  }
}
@media (max-width: 950px) {
  main {
    grid-template-columns: minmax(0, 1fr) 315px;
  }
  aside {
    padding: 24px 20px;
  }
  .stage-heading {
    left: 25px;
    top: 30px;
  }
  h1 {
    font-size: 36px;
  }
  .stage-tools {
    top: auto;
    bottom: 60px;
    right: 15px;
  }
  .stage-bottom {
    left: 20px;
    right: 20px;
  }
  .orbit-hint {
    display: none;
  }
}
@media (max-width: 700px) {
  .topbar {
    height: 70px;
    padding: 0 20px;
  }
  .brand {
    font-size: 16px;
  }
  .status {
    font-size: 9px;
    max-width: 140px;
    line-height: 1.5;
  }
  .status i {
    flex-shrink: 0;
  }
  main {
    display: block;
  }
  .stage {
    height: 65svh;
    min-height: 450px;
  }
  .stage-heading {
    left: 23px;
    top: 26px;
  }
  h1 {
    font-size: 34px;
  }
  .stage-heading p {
    display: none;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 26px 24px;
  }
  .input-hint {
    min-height: 0;
  }
  .pose-row {
    grid-template-columns: 55px 1fr 45px;
  }
  .controller-guide {
    margin-bottom: 0;
  }
  footer {
    padding: 17px 24px;
    font-size: 8px;
    gap: 20px;
  }
  .stage-tools {
    bottom: 53px;
  }
  .stage-bottom {
    bottom: 20px;
  }
}

.stage-tools a {
  text-decoration: none;
}
.reflection-option {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 20px;
}
html.output-mode,
body.output-mode {
  background: transparent !important;
  overflow: hidden;
}
body.output-mode header,
body.output-mode aside,
body.output-mode footer,
body.output-mode .stage-heading,
body.output-mode .stage-tools,
body.output-mode .stage-bottom {
  display: none;
}
body.output-mode main {
  display: block;
  min-height: 0;
}
body.output-mode .stage {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  background: transparent;
}

@media (min-width: 701px) {
  main {
    height: calc(100svh - 124px);
    min-height: 560px;
  }
  .stage {
    min-height: 0;
  }
  aside {
    overflow-y: auto;
  }
}

[hidden] {
  display: none !important;
}
.panel-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.panel-tabs button {
  flex: 1;
  font-size: 11px;
  border: 0;
  color: var(--muted);
}
.panel-tabs button[aria-pressed='true'] {
  background: #35473d;
  color: var(--mint);
}
.settings-intro h3 {
  font: normal 28px/1.2 var(--serif);
  margin: 9px 0;
}
.settings-intro p {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}
.settings-tracking {
  font-size: 10px;
  color: var(--mint);
  padding: 11px 12px;
  background: #b4dbc509;
  border: 1px solid #b4dbc522;
  border-radius: 6px;
  margin: 18px 0;
}
.setting-help {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 14px;
}
.settings-link {
  display: block;
  width: 100%;
  margin: 18px 0 14px;
  font-size: 11px;
  color: var(--mint);
}
#settings-page .control-section {
  margin-top: 18px;
  padding-bottom: 0;
}
#settings-page .section-title > span {
  font-size: 7px;
  letter-spacing: 1px;
}
.settings-save {
  position: sticky;
  bottom: -27px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 14px 0 20px;
  margin-top: 18px;
}
.settings-save p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 12px;
}
.settings-save .primary-button {
  width: 100%;
  background: var(--mint);
  border-color: var(--mint);
  color: #1f3529;
  font-size: 12px;
  padding: 12px;
}
.primary-button:disabled {
  opacity: 0.5;
  cursor: default;
}
.settings-secondary {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.settings-secondary button {
  flex: 1;
  font-size: 9px;
  padding: 9px 4px;
}
.settings-save p[data-dirty='true'] {
  color: #e9cf9a;
}

.setting-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--mint);
}
.setting-number input[type='number'] {
  width: 76px;
  padding: 5px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--mint);
  font:
    11px Consolas,
    monospace;
  text-align: right;
  margin: 0;
}
.pom-tuning .tuning {
  align-items: center;
}
.pom-tuning .setting-help {
  font-size: 9px;
}

.source-link {
  font-size: 11px;
  color: inherit;
  white-space: nowrap;
  margin-left: auto;
  margin-right: 20px;
}
.demo-notice {
  display: none;
}
.demo-mode .demo-notice {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted, #77827e);
}
.demo-mode .stage-tools a[href='?output=1'] {
  display: none;
}
@media (max-width: 600px) {
  .topbar .source-link {
    font-size: 10px;
    margin-right: 8px;
  }
  .topbar .status {
    display: none;
  }
}
