:root {
  color-scheme: light;
  --ink: #282828;
  --muted: #656565;
  --line: #dbdbdb;
  --panel: #f8f8f8;
  --green: #525252;
  --accent: #e7e7e7;
  font:
    15px/1.42 'Inter',
    'Segoe UI',
    Arial,
    sans-serif;
  color: var(--ink);
  background: #efefef;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 68px;
  background: #222222;
  color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.identity,
.header-actions,
.view-foot,
.dialog-head,
.dialog-actions,
.links {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  font-size: 24px;
  letter-spacing: 0.13em;
  font-weight: 850;
}
.identity i {
  height: 22px;
  width: 1px;
  background: #616161;
}
.identity strong {
  font-weight: 500;
  font-size: 18px;
}
.header-actions span {
  color: #bfbfbf;
  font-size: 13px;
}
.header-actions button {
  background: #373737;
  color: white;
  border-color: #5f5f5f;
}
.header-actions .accent,
.accent {
  background: var(--accent);
  color: #2b2b2b;
  border-color: transparent;
  font-weight: 650;
}
button,
select,
input,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button,
select,
input:not([type='checkbox']),
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #ffffff;
}
button {
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
button:hover {
  filter: brightness(0.96);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #868686;
  outline-offset: 2px;
}
main {
  display: grid;
  grid-template-columns: clamp(195px, 18vw, 270px) minmax(290px, 1fr) clamp(
      275px,
      24vw,
      355px
    );
  min-height: 650px;
  height: calc(100dvh - 68px);
}
aside {
  background: var(--panel);
  overflow: auto;
  padding: 23px 17px;
}
#library {
  border-right: 1px solid var(--line);
}
#inspector {
  border-left: 1px solid var(--line);
}
.section-cap {
  font:
    650 11px/1.5 'IBM Plex Mono',
    'SFMono-Regular',
    Consolas,
    monospace;
  letter-spacing: 0.13em;
  color: #696969;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
#inspector h2,
.view-head h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.05em;
  margin: 3px 0 16px;
}
.segments {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}
.segments button,
#tabs button {
  font-size: 13px;
  padding: 5px 8px;
  background: transparent;
  border-color: transparent;
}
.segments button.active,
#tabs button.active {
  background: #e6e6e6;
  color: #4a4a4a;
  border-color: #c8c8c8;
}
#cards {
  display: grid;
  gap: 8px;
}
.card {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
}
.card.active {
  border-color: #a7a7a7;
  background: #ececec;
}
.swatch {
  width: 48px;
  height: 51px;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  flex: none;
}
.card b {
  font-size: 14px;
  font-weight: 610;
  display: block;
  line-height: 1.22;
}
.card small,
.export-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px clamp(12px, 2vw, 32px) 18px;
}
.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.view-head h2 {
  font-size: 25px;
  margin: 2px 0 13px;
}
.view-head button {
  font-size: 13px;
  padding: 5px 10px;
}
.view-head button[aria-pressed='true'] {
  background: #e6e6e6;
}
#stage {
  position: relative;
  min-height: 210px;
  flex: 1;
  padding: 15px;
  background: #383838;
  border: 1px solid #373737;
  border-radius: 9px;
  box-shadow: inset 0 0 35px #1f1f1f33;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.canvas-slot {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
canvas {
  display: block;
  touch-action: none;
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 4px 20px #11111166;
}
#grid {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(
      to right,
      transparent 33.2%,
      #ffffffaa 33.3%,
      transparent 33.5%,
      transparent 66.4%,
      #ffffffaa 66.6%,
      transparent 66.8%
    ),
    linear-gradient(
      to bottom,
      transparent 33.2%,
      #ffffffaa 33.3%,
      transparent 33.5%,
      transparent 66.4%,
      #ffffffaa 66.6%,
      transparent 66.8%
    );
}
.view-foot {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin: 9px 0 18px;
  gap: 8px;
}
.view-foot span:first-child {
  color: var(--ink);
  font-family: Consolas, monospace;
}
.scene-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}
.scene-actions label,
#fields label {
  font-size: 13px;
  font-weight: 550;
  color: #525252;
}
.scene-actions input,
select,
input:not([type='checkbox']),
textarea {
  width: 100%;
  padding: 7px 8px;
  margin-top: 4px;
}
#tabs {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 13px;
}
#fields h3 {
  font-size: 16px;
  letter-spacing: -0.025em;
  margin: 20px 0 10px;
}
#fields .field {
  display: block;
  margin: 9px 0;
}
#fields .range {
  display: grid;
  grid-template-columns: 1fr 68px;
  align-items: center;
  column-gap: 8px;
}
#fields .range label {
  grid-column: 1/-1;
}
input[type='range'] {
  accent-color: #616161;
  border: 0 !important;
  padding: 0 !important;
}
input[type='color'] {
  height: 32px;
  padding: 3px !important;
}
.row3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.row3 label {
  display: block;
}
.row3 input {
  font-family: Consolas, monospace;
}
.subtle,
#fields p {
  font-size: 13px;
  color: var(--muted);
}
.buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.buttons button {
  font-size: 13px;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0;
}
.check input,
.export-row input {
  accent-color: var(--green);
}
dialog {
  width: min(470px, 94vw);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  color: var(--ink);
  background: #f9f9f9;
  box-shadow: 0 16px 80px #1e1e1e40;
}
dialog::backdrop {
  background: #1e1e1ed0;
}
.dialog-head {
  justify-content: space-between;
}
.dialog-head button {
  font-size: 22px;
  border: 0;
  padding: 0 9px;
}
.dialog-head h2 {
  letter-spacing: -0.04em;
}
dialog p {
  margin: 12px 0;
  color: var(--muted);
}
.export-row {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 6px;
}
.dialog-actions,
.links {
  flex-wrap: wrap;
  margin-top: 14px;
  gap: 7px;
}
.links {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  gap: 14px;
}
.links a {
  color: var(--green);
  font-size: 13px;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #353535;
  color: #ffffff;
  padding: 8px 15px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
#toast.show {
  opacity: 1;
}
#failure {
  position: fixed;
  inset: 25% 15% auto;
  background: white;
  border: 1px solid var(--line);
  padding: 25px;
  border-radius: 12px;
}
#exportStatus {
  display: block;
  margin-top: 8px;
}
@media (max-width: 1050px) {
  main {
    grid-template-columns: 180px minmax(250px, 1fr) 260px;
  }
  .workspace {
    padding: 15px 10px;
  }
  .view-foot {
    display: block;
  }
  .view-foot span {
    display: block;
  }
  .swatch {
    width: 36px;
    height: 42px;
  }
  aside {
    padding: 18px 12px;
  }
}
@media (max-width: 760px) {
  header {
    padding: 0 12px;
    gap: 8px;
    height: 58px;
  }
  .header-actions span,
  .identity i {
    display: none;
  }
  .brand {
    font-size: 18px;
  }
  .identity strong {
    font-size: 14px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-actions button {
    font-size: 12px;
  }
  main {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .workspace {
    order: 0;
    min-height: 520px;
  }
  #stage {
    height: 390px;
    flex: none;
  }
  #library {
    order: 1;
  }
  #inspector {
    order: 2;
  }
  #cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .scene-actions {
    grid-template-columns: 1fr;
  }
  .view-foot {
    margin-bottom: 8px;
  }
  aside {
    overflow: visible;
  }
  .identity {
    gap: 5px;
  }
}
/* Viewport tools and scene tree */
:root {
  --ink: #262626;
  --muted: #696969;
  --green: #363636;
  --line: #d6d6d6;
  --panel: #f7f7f7;
  --accent: #ededed;
  background: #e5e5e5;
}
header {
  background: #212121;
}
.section-cap {
  color: #696969;
}
.identity .brand {
  font-size: 21px;
  color: white;
}
.header-actions .accent {
  background: #f7f7f7;
  color: #252525;
}
.header-actions span {
  color: #cacaca;
}
.header-actions button {
  background: #313131;
  border-color: #535353;
}
main {
  grid-template-columns: clamp(174px, 16vw, 224px) minmax(320px, 1fr) clamp(
      245px,
      22vw,
      300px
    );
  min-height: 570px;
}
.workspace {
  position: relative;
  padding: 16px 18px;
  min-height: 0;
}
.view-head {
  padding-bottom: 7px;
}
.view-head h2 {
  margin: 0 0 6px;
  font-size: 23px;
}
#stage {
  background: #565656;
  padding: 10px;
  border: 1px solid #4c4c4c;
  border-radius: 6px;
  min-height: 180px;
}
#library,
#inspector {
  padding: 16px 13px;
}
#inspector h2 {
  font-size: 21px;
  margin-bottom: 11px;
}
.rail-tabs,
.view-switch {
  display: flex;
  align-items: center;
  gap: 3px;
}
.rail-tabs {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.rail-tabs button,
.view-switch button {
  font-size: 13px;
  border-radius: 5px;
}
.rail-tabs button {
  background: transparent;
  border: 0;
}
.rail-tabs .active,
.view-switch button[aria-pressed='true'],
.tool.active,
.chips .chosen-chip,
#pickItems .chosen-chip,
#tabs button.active,
.segments button.active,
.view-options button[aria-pressed='true'] {
  background: #363636;
  color: #ffffff;
  border-color: #363636;
}
.tree-title,
.field-label {
  font-size: 13px;
  font-weight: 600;
}
.tree-title {
  margin: 16px 0 6px;
  color: #595959;
}
.object-row,
.empty-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  margin: 2px 0;
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 14px;
}
.object-row.active {
  font-weight: 650;
  border-color: #c5c5c5;
  background: #e8e8e8;
}
.symbol {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.empty-row {
  color: #696969;
}
.card.active {
  background: #e3e3e3;
  border-color: #ababab;
}

.toolstrip,
.view-options,
#tools,
.chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.toolstrip {
  margin-top: 8px;
  justify-content: space-between;
}
.toolstrip button {
  font-size: 13px;
  padding: 5px 10px;
}
.view-foot {
  margin: 7px 0 12px;
  font-size: 12px;
}
.view-foot #modeHelp {
  text-align: right;
}
.view-options button {
  background: #e9e9e9;
}
.canvas-slot {
  isolation: isolate;
  touch-action: none;
}
#view {
  cursor: grab;
}
.dragging #view {
  cursor: grabbing;
}
#overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: hidden;
}
#grid {
  z-index: 1;
}
#overlay {
  z-index: 2;
}
.knob,
.axis {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.knob .hit {
  fill: transparent;
}
.knob .dot {
  fill: #f8f8f8;
  stroke: #282828;
  stroke-width: 1.6;
}
.knob.chosen .dot,
.knob:hover .dot {
  fill: #161616;
  stroke: white;
  stroke-width: 2.2;
}
.knob-label {
  opacity: 1;
  fill: white;
  stroke: #333333;
  stroke-width: 3.3;
  stroke-linejoin: round;
  paint-order: stroke;
  font:
    600 11px system-ui,
    sans-serif;
  pointer-events: none;
}
.bone-line,
.light-line {
  stroke: #242424;
  stroke-opacity: 0.33;
  stroke-width: 1;
  pointer-events: none;
}
.light-line {
  stroke-dasharray: 4 5;
  stroke-width: 1.4;
  stroke-opacity: 0.64;
}
.axis-hit {
  stroke: transparent;
  stroke-width: 13;
}
.axis-line {
  stroke: #232323;
  stroke-width: 2;
  paint-order: stroke;
}
.axis circle {
  fill: #2e2e2e;
  stroke: #dddddd;
  stroke-width: 1;
}
.axis text {
  font: bold 8px system-ui;
  fill: #ffffff;
  pointer-events: none;
}
.knob.lamp .dot {
  r: 6;
  fill: #ffffff;
  stroke-width: 2;
}
.axis:hover circle {
  fill: #555555;
}
#miniWrap {
  position: absolute;
  right: 28px;
  bottom: 167px;
  z-index: 5;
  padding: 4px;
  background: #222222;
  color: white;
  border: 1px solid #999999;
  border-radius: 3px;
}
#miniWrap span {
  display: block;
  font: 10px monospace;
  margin-top: 3px;
}
#mini {
  box-shadow: none;
}
.choice-group {
  margin: 11px 0;
}
.field-label {
  margin: 0 0 4px;
}
#fields .chips button,
#pickItems button,
.buttons button {
  font-size: 12px;
  padding: 5px 8px;
}
.number-row {
  margin: 6px 0;
}
.number-row label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}
.stepper {
  display: flex;
  align-items: stretch;
}
.stepper button {
  padding: 1px 5px;
  border-radius: 3px;
}
.stepper input[type='number'] {
  padding: 2px;
  width: 50px;
  font: 12px monospace;
  text-align: center;
  appearance: textfield;
  border-radius: 2px;
  margin: 0;
}
.stepper input::-webkit-inner-spin-button {
  display: none;
}
#fields h3 {
  margin: 14px 0 7px;
}
.advanced {
  margin: 14px 0 5px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
summary {
  font-size: 13px;
  cursor: pointer;
}
#pickItems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 42vh;
  overflow: auto;
  margin-top: 10px;
}
#pickItems button {
  text-align: left;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
@media (max-width: 900px) and (min-width: 761px) {
  main {
    grid-template-columns: 160px minmax(260px, 1fr) 225px;
  }
  .workspace {
    padding: 12px 8px;
  }
  .view-switch button {
    font-size: 12px;
    padding: 4px;
  }
  .view-head {
    align-items: flex-end;
  }
}
@media (max-width: 760px) {
  .workspace {
    min-height: 540px;
  }
  .toolstrip button {
    padding: 5px 6px;
  }
  #miniWrap {
    bottom: 200px;
  }
  #stage {
    min-height: 265px;
  }
  .header-actions #saved {
    display: none;
  }
  .identity strong {
    font-size: 13px;
  }
  .header-actions button {
    padding: 4px 7px;
  }
  .view-foot #modeHelp {
    text-align: left;
  }
}
.panel-line {
  stroke: #202020;
  stroke-opacity: 0.52;
  stroke-width: 1.4;
  pointer-events: none;
}

:root {
  --ink: #151515;
  --muted: #606060;
  --line: #d8d8d8;
  --panel: #fafafa;
  --accent: #fff;
  --green: #111;
  background: #eee;
  color-scheme: light;
}
header {
  height: 58px;
  padding: 0 20px;
  background: #101010;
}
.kp {
  height: 46px;
  width: 46px;
  object-fit: contain;
}
.identity {
  gap: 12px;
}
.identity strong {
  font:
    600 18px/1.2 'Inter',
    'Segoe UI',
    sans-serif;
  letter-spacing: -0.5px;
}
main {
  height: calc(100dvh - 58px);
}
.workspace {
  background: #eaeaea;
  padding: 13px 14px;
}
.view-head h2 {
  font-size: 21px;
  margin: 0;
}
.view-head {
  padding: 2px 0 12px;
}
#stage {
  background: #272727;
  border: 1px solid #1d1d1d;
  padding: 0;
  border-radius: 5px;
  box-shadow: none;
}
#miniWrap {
  bottom: 13px;
  right: 13px;
  max-width: 30%;
  background: #141414;
  box-shadow: 0 3px 12px #0005;
}
#library,
#inspector {
  background: #fafafa;
}
.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 5px 0 10px;
}
.rail-heading h2 {
  font-size: 20px;
  letter-spacing: -0.8px;
  font-weight: 600;
}
.rail-heading button {
  font-size: 12px;
  padding: 4px 7px;
}
.layer-row {
  display: flex;
  align-items: center;
  min-height: 33px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.layer-row:hover {
  background: #f0f0f0;
}
.layer-row.current {
  background: #e4e4e4;
  border-color: #ccc;
}
.layer-row.muted .layer-name {
  opacity: 0.54;
}
.layer-row .object-row {
  flex: 1;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 3px 4px;
  font-weight: 500;
}
.layer-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layer-action {
  width: 25px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 4px;
  border: 0;
  background: transparent;
}
.layer-action:hover {
  background: #ddd;
}
.layer-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.empty-row {
  font-size: 12px;
  padding: 3px 7px;
}
.tree-title {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 14px;
}
#viewNav {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  padding: 2px;
  gap: 1px;
  background: #191919ed;
  border: 1px solid #ffffff30;
  border-radius: 5px;
  z-index: 4;
}
#viewNav button {
  background: transparent;
  color: #fff;
  border: 0;
  padding: 4px 9px;
  font-size: 12px;
}
#viewNav button:hover {
  background: #444;
}
#planeRead {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 12px;
  pointer-events: none;
  background: #1b1b1be8;
  color: #f5f5f5;
  padding: 4px 8px;
  border-radius: 4px;
  font: 11px/1.4 monospace;
}
#planeRead:empty {
  display: none;
}
.number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 13px;
}
.stepper {
  border-radius: 4px;
  border: 1px solid #c8c8c8;
  overflow: hidden;
  flex: none;
}
.stepper button {
  border: 0;
  border-radius: 0;
  background: #efefef;
  color: #171717;
  padding: 3px 7px;
  min-height: 26px;
}
.stepper .scrub-value {
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
  min-width: 48px;
  border-inline: 1px solid #d4d4d4;
  background: #fff;
  font: 12px monospace;
}
.stepper .scrub-value:active {
  background: #2e2e2e;
  color: #fff;
}
.stepper .scrub-value:before {
  content: '‹';
  float: left;
  color: #888;
}
.stepper .scrub-value:after {
  content: '›';
  float: right;
  color: #888;
}
.axis-pad rect {
  fill: #171717;
  stroke: #eee;
  stroke-width: 1.4px;
}
.axis-pad.locked rect,
.axis-pad:hover rect {
  fill: white;
  stroke: #171717;
}
.axis-pad.locked text,
.axis-pad:hover text {
  fill: black;
}
.axis-pad text {
  font: bold 12px system-ui;
  fill: white;
}
.axis-pad {
  cursor: ew-resize;
}
#inspector .chips button,
#inspector .buttons button {
  min-height: 28px;
}
#tabs {
  position: sticky;
  top: -16px;
  padding: 8px 0;
  background: #fafafa;
  z-index: 4;
}
.axis-label {
  font: 13px monospace;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .header-actions {
    gap: 3px;
  }
  .identity {
    gap: 6px;
  }
  header {
    padding: 0 8px;
  }
  .kp {
    width: 35px;
  }
  .workspace {
    min-height: 530px;
  }
  .rail-heading {
    margin: 2px 0;
  }
  #miniWrap {
    bottom: 6px;
    right: 6px;
  }
  .view-head {
    flex-wrap: wrap;
  }
}

.contact-line {
  stroke: #333;
  stroke-dasharray: 3 4;
  stroke-opacity: 0.7;
  pointer-events: none;
}
.floor-marker {
  fill: #fff;
  stroke: #262626;
  pointer-events: none;
}
.keymap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  margin: 15px 0 0;
}
.keymap dt,
.keymap dd {
  border-top: 1px solid #ddd;
  padding: 6px 0;
  font-size: 13px;
}
.keymap dd {
  text-align: right;
  margin: 0;
  font-family: monospace;
}

#picker.visual-picker {
  width: min(640px, 94vw);
}
.visual-picker #pickItems {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  max-height: 60vh;
}
.visual-picker #pickItems button {
  padding: 0 0 7px;
  overflow: hidden;
  text-align: center;
  font-weight: 550;
}
.visual-picker #pickItems img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
  margin-bottom: 5px;
}
#toast {
  z-index: 8;
}

/* Editing surfaces and the fixed viewport tool shelf. */
:root {
  color-scheme: dark;
  --ink: #eee;
  --muted: #b4b4b4;
  --line: #484848;
  --panel: #252525;
  --accent: #ededed;
  --green: #ddd;
  background: #191919;
}
header {
  background: #000;
}
#library,
#inspector,
#tabs,
dialog,
#failure {
  background: var(--panel);
}
.workspace {
  background: #191919;
}
button,
select,
input:not([type='checkbox']),
textarea {
  background: #303030;
}
button:hover:not(:disabled) {
  filter: brightness(1.16);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline-color: #f5f5f5;
}
#fields label,
.scene-actions label,
.tree-title,
.empty-row {
  color: #c2c2c2;
}
.layer-row.current,
.card.active {
  background: #414141;
  border-color: #626262;
}
.layer-row:hover,
.layer-action:hover {
  background: #383838;
}
.layer-row .object-row,
.layer-action,
.card:not(.active) {
  background: transparent;
}
.rail-tabs .active,
.view-switch button[aria-pressed='true'],
.tool.active,
.chips .chosen-chip,
#pickItems .chosen-chip,
#tabs button.active,
.segments button.active,
.workspace button[aria-pressed='true'],
.accent {
  background: #eee;
  color: #151515;
  border-color: #eee;
}
.keymap dt,
.keymap dd,
.stepper,
.stepper .scrub-value {
  border-color: var(--line);
}
.stepper button {
  background: #333;
  color: #eee;
}
.stepper .scrub-value {
  background: #202020;
}
.stepper .scrub-value:active {
  background: #4b4b4b;
}
.view-head {
  padding: 0 0 10px;
}
.viewport-head,
.transform-options,
#rotationControls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.viewport-head {
  justify-content: space-between;
  background: #262626;
  border: 1px solid #424242;
  border-radius: 6px 6px 0 0;
  padding: 5px 7px;
}
.viewport-head button,
#viewNav button,
.toolstrip button {
  border: 1px solid #494949;
  background: #303030;
  color: #dedede;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.4;
}
#viewNav {
  position: static;
  border: 0;
  background: transparent;
  padding: 0;
  gap: 3px;
  z-index: auto;
}
#stage {
  --shelf: 54px;
  grid-template-columns: var(--shelf) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: stretch;
  border: 1px solid #414141;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background: #1d1d1d;
}
#tools {
  grid-area: 1/1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  overflow-y: auto;
  padding: 6px 4px;
  gap: 2px;
  background: #232323;
  border-right: 1px solid #4d4d4d;
  scrollbar-width: thin;
}
#tools button {
  display: grid;
  place-items: center;
  gap: 2px;
  flex: none;
  padding: 5px 0;
  border: 1px solid transparent;
  background: transparent;
  font-size: 10px;
  line-height: 1.1;
  color: #d0d0d0;
}
#tools .active {
  background: #eee;
  color: #171717;
}
#tools button:hover:not(.active):not(:disabled) {
  background: #3d3d3d;
}
#tools button:nth-child(5) {
  margin-top: 7px;
}
#tools svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.canvas-slot {
  grid-area: 1/2;
  min-width: 0;
  overflow: hidden;
}
#planeRead {
  left: calc(var(--shelf) + 8px);
  max-width: calc(100% - var(--shelf) - 16px);
}
#transformRead {
  position: absolute;
  left: calc(var(--shelf) + 12px);
  top: 12px;
  pointer-events: none;
  z-index: 3;
  padding: 4px 9px;
  background: #141414e8;
  color: #fff;
  border-radius: 4px;
  font: 600 13px/1.5 monospace;
}
#transformRead:empty {
  display: none;
}
#miniWrap.avoid-handle {
  bottom: auto;
  top: 10px;
}
.toolstrip {
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
.view-options {
  margin-left: auto;
}
.direction-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 3px;
}
.manipulator {
  cursor: grab;
  touch-action: none;
  pointer-events: visiblePainted;
}
.manipulator .grab-path {
  stroke: transparent;
  fill: none;
  stroke-width: 18;
  pointer-events: stroke;
}
.handle-edge,
.handle-stroke,
.angle-tick,
.ring-dot,
.handle-name {
  pointer-events: none;
}
.handle-edge,
.handle-stroke {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.handle-edge {
  stroke: #252525;
  stroke-width: 5;
}
.handle-stroke {
  stroke: #fff;
  stroke-width: 2.3;
}
.handle-tip,
.ring-grip {
  fill: #fafafa;
  stroke: #222;
  stroke-width: 2;
  pointer-events: all;
}
.angle-tick {
  stroke: #222;
  stroke-width: 1.5;
}
.ring-dot {
  fill: #222;
}
.free-hit {
  fill: transparent;
  pointer-events: all;
}
.plane-grip {
  fill: #e5e5e5b8;
  stroke: #252525;
  stroke-width: 1.5;
  pointer-events: all;
}
.handle-name {
  fill: #fff;
  stroke: #222;
  paint-order: stroke;
  stroke-width: 3;
  stroke-linejoin: round;
  font: 600 11px system-ui;
}
.manipulator:hover .handle-stroke {
  stroke-width: 3.8;
}
.manipulator:hover .ring-grip,
.manipulator:hover .handle-tip {
  stroke-width: 3;
}
.dragging,
.dragging .manipulator,
.dragging .knob {
  cursor: grabbing;
}
@media (max-width: 760px) {
  main {
    height: auto;
  }
  .workspace {
    padding: 10px 8px;
  }
  #stage {
    --shelf: 47px;
  }
  #tools button {
    padding: 4px 0;
  }
  .viewport-head {
    gap: 5px;
    padding: 4px;
  }
  .viewport-head button,
  #viewNav button,
  .toolstrip button {
    padding: 4px 6px;
  }
  .view-options {
    margin-left: 0;
  }
  #planeRead {
    font-size: 9px;
    bottom: 5px;
  }
}
