.n0ve-panel {
  position: fixed;
  z-index: 100;
  top: max(6px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  width: min(255px, 44vw);
  max-height: calc(100% - max(6px, env(safe-area-inset-top)) - max(6px, env(safe-area-inset-bottom)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f5f5f5;
  background: #121212;
  border: 1px solid #666;
  border-radius: 11px;
  box-shadow: 0 4px 18px #0009;
  color-scheme: dark;
  font: 14px/1.35 system-ui, sans-serif;
  text-align: left;
  touch-action: auto;
  user-select: none;
  -webkit-user-select: none;
}
.n0ve-panel *, .n0ve-panel { box-sizing: border-box; }
.n0ve-panel[hidden], .n0ve-panel [hidden] { display: none !important; }
.n0ve-panel.n0ve-fold > :not(.n0ve-head), .n0ve-panel.n0ve-fold .n0ve-head > :not(:last-child) { display: none; }
.n0ve-panel.n0ve-left { right: auto; left: max(8px, env(safe-area-inset-left)); }
.n0ve-panel.n0ve-fold { width: auto; }
.n0ve-panel.n0ve-fold .n0ve-head { border: 0; padding: 2px; }
.n0ve-panel .n0ve-head, .n0ve-panel .n0ve-foot {
  flex: none;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
}
.n0ve-panel .n0ve-head { border-bottom: 1px solid #414141; }
.n0ve-panel .n0ve-head strong { flex: 1; font-size: 15px; }
.n0ve-panel .n0ve-foot { border-top: 1px solid #414141; }
.n0ve-panel .n0ve-foot button { flex: 1; }
.n0ve-panel .n0ve-body {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.n0ve-panel button, .n0ve-panel select, .n0ve-panel input:not([type=range]) {
  margin: 0;
  padding: 4px 8px;
  min-height: 33px;
  max-width: 100%;
  color: #fafafa;
  background: #222;
  border: 1px solid #666;
  border-radius: 6px;
  font: inherit;
  letter-spacing: normal;
  cursor: pointer;
  touch-action: manipulation;
}
.n0ve-panel input[type=text] { cursor: text; user-select: text; -webkit-user-select: text; }
.n0ve-panel .n0ve-primary { color: #141414; background: #eee; font-weight: 700; border-color: #eee; }
.n0ve-panel :disabled { opacity: .47; cursor: default; }
.n0ve-panel :focus-visible { outline: 2px solid white; outline-offset: -2px; }
.n0ve-panel label { display: grid; gap: 3px; min-width: 0; font-size: 13px; }
.n0ve-panel label select, .n0ve-panel label input:not([type=range]) { width: 100%; font-size: 16px; }
.n0ve-panel .n0ve-hint { margin: 0; font-size: 12px; color: #c0c0c0; }
.n0ve-panel .n0ve-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.n0ve-panel .n0ve-grid label > span { display: flex; justify-content: space-between; color: #ddd; }
.n0ve-panel .n0ve-grid output { color: #fff; font-variant-numeric: tabular-nums; }
.n0ve-panel .n0ve-grid input { width: 100%; height: 28px; margin: 0; accent-color: #fafafa; touch-action: pan-y; }
.n0ve-panel .n0ve-extra { display: grid; gap: 6px; }
.n0ve-panel details { border-top: 1px solid #404040; padding-top: 3px; }
.n0ve-panel details > :not(summary) { margin: 5px 0; }
.n0ve-panel summary { padding: 7px 0; cursor: pointer; }
.n0ve-panel .n0ve-message {
  flex: none;
  margin: 0;
  padding: 5px 9px;
  background: #333;
  color: white;
  font-size: 13px;
}
.n0ve-editing [data-control-id] { touch-action: none; cursor: move; }
.n0ve-editing .n0ve-selected { outline: 2px dashed #fff; outline-offset: 2px; }


/* Floating inspector. The grip remains reachable in the collapsed window. */
.n0ve-panel {width:min(300px,45vw);border:1px solid #ffffff42;border-radius:18px;background:rgba(27,28,30,.66);-webkit-backdrop-filter:blur(18px) saturate(1.25);backdrop-filter:blur(18px) saturate(1.25);box-shadow:inset 0 1px 0 #ffffff24,0 9px 32px #0008}
.n0ve-panel .n0ve-head {position:relative;padding:15px 12px 7px;cursor:grab;touch-action:none;background:#ffffff09}
.n0ve-head::before {content:"";position:absolute;top:5px;left:50%;transform:translateX(-50%);width:36px;height:4px;border-radius:5px;background:#ffffff78;pointer-events:none}
.n0ve-panel .n0ve-head:active {cursor:grabbing}
.n0ve-panel.n0ve-fold .n0ve-head > strong {display:block}
.n0ve-panel.n0ve-fold .n0ve-head {padding:14px 8px 6px}
.n0ve-panel .n0ve-body {padding:9px 12px;gap:7px}
.n0ve-panel details {background:#ffffff0a;border:1px solid #ffffff1c;border-radius:9px;padding:0 9px}
.n0ve-panel summary {font-weight:600;padding:8px 0}
.n0ve-steering {display:grid;gap:7px}
.n0ve-steering input {width:100%;accent-color:#eee}
.n0ve-steering output {font-size:12px;font-variant-numeric:tabular-nums}
.n0ve-motion-meter {position:relative;height:22px;margin:2px 6px;pointer-events:none}
.n0ve-motion-meter::before,.n0ve-motion-meter::after {content:"";position:absolute;top:50%;background:white;border-radius:6px}
.n0ve-motion-meter::before {left:calc(50% + min(0%,var(--offset,0%)));width:var(--length,0%);height:3px;transform:translateY(-50%)}
.n0ve-motion-meter::after {left:calc(50% + var(--offset,0%));width:8px;height:8px;transform:translate(-50%,-50%)}
@media(prefers-reduced-transparency:reduce){.n0ve-panel{background:#202124;backdrop-filter:none}}

.n0ve-panel label input[type=checkbox]{width:20px;min-height:20px;accent-color:#eee}
