:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #151418;
  color: #f4f0ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid #474048;
  background: #242229;
  color: #f4f0ec;
  min-height: 36px;
  border-radius: 6px;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: #e7a95d;
  outline: none;
}

.warning-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #554b55;
  border-radius: 7px;
  background: #1d1b21;
  color: #f4f0ec;
  box-shadow: 0 24px 70px #000b;
}

.warning-dialog::backdrop {
  background: #08070ab8;
}

.warning-dialog-body {
  padding: 22px;
}

.warning-dialog h2 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.warning-dialog p {
  margin: 0 0 18px;
  color: #c8c1c8;
  line-height: 1.5;
}

.dialog-check {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.dialog-actions button {
  min-width: 92px;
}

.primary-action {
  border-color: #a8753d;
  background: #7b5128;
}

.profile-dialog {
  position: fixed;
  inset: auto 372px 14px auto;
  width: min(360px, calc(100vw - 400px));
  max-height: calc(100vh - 28px);
  margin: 0;
  padding: 0;
  border: 1px solid #554b55;
  border-radius: 7px;
  background: #1d1b21;
  color: #f4f0ec;
  box-shadow: 0 24px 70px #000b;
  overflow: auto;
  z-index: 40;
}

.sweep-profile-dialog {
  width: min(400px, calc(100vw - 400px));
}

.profile-dialog::backdrop {
  background: #08070ac9;
}

.profile-dialog-shell {
  padding: 12px;
}

.profile-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.profile-dialog h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
}

.profile-dialog-head p {
  margin: 4px 0 0;
  color: #aaa3ac;
  font-size: 12px;
}

.profile-dialog-head button {
  width: 30px;
  min-height: 30px;
}

.profile-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid #464049;
  border-radius: 6px;
  background: #39383b;
  touch-action: none;
}

.profile-axis {
  stroke: #ffffff20;
  stroke-width: 1;
}

.profile-path {
  fill: #24373a;
  stroke: #58f6ff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.profile-point {
  fill: #e62bea;
  stroke: #2a092b;
  stroke-width: 1.5;
  cursor: grab;
}

.profile-point.selected {
  fill: #ffffff;
  stroke: #e62bea;
  stroke-width: 3;
}

.profile-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .profile-dialog {
    inset: auto 12px 12px auto;
    width: min(360px, calc(100vw - 24px));
  }

  .sweep-profile-dialog {
    width: min(400px, calc(100vw - 24px));
  }
}

.studio-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 360px;
  height: 100vh;
}

.outliner-panel {
  position: relative;
  z-index: 10;
  min-width: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid #312c33;
  background: #19181d;
  padding: 14px 10px;
}

.outliner-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 6px 12px;
  border-bottom: 1px solid #332e35;
  font-weight: 800;
}

.outliner-titlebar button {
  width: 34px;
  min-height: 32px;
}

.outliner-context-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  min-width: 164px;
  padding: 4px;
  border: 1px solid #45404a;
  border-radius: 4px;
  background: #1d1b21;
  box-shadow: 0 10px 28px #00000066;
}

.outliner-context-menu.hidden,
.outliner-context-menu button.hidden {
  display: none;
}

.outliner-context-menu button {
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.outliner-context-menu button:hover,
.outliner-context-menu button:focus-visible {
  background: #2b2830;
  outline: none;
}

.outliner-context-menu button.danger {
  color: #ef8a84;
}

.viewport-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  z-index: 1;
  background: radial-gradient(circle at 55% 36%, #39333c 0, #1b1a20 42%, #111115 100%);
}

#viewport {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.selection-marquee {
  position: absolute;
  z-index: 6;
  border: 1px solid rgba(88, 246, 255, 0.9);
  background: rgba(88, 246, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(8, 18, 22, 0.45);
  pointer-events: none;
}

.selection-marquee.hidden {
  display: none;
}

.viewport-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  pointer-events: none;
  z-index: 5;
}

.placement-status {
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: min(560px, calc(100% - 220px));
  padding: 9px 14px;
  border: 1px solid #5a4b37;
  border-radius: 6px;
  background: #18161dcc;
  color: #ffe0ad;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 24px #00000045;
}

.placement-status.hidden {
  display: none;
}

.hierarchy-navigation-hint {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #39343d;
  border-radius: 6px;
  background: #18161dcc;
  color: #d9d5dc;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 8px 24px #0000003d;
}

.hierarchy-navigation-hint.hidden {
  display: none;
}

.viewport-exit-editor {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #716775;
  border-radius: 5px;
  background: #211f25ee;
  color: #f4edf5;
  box-shadow: 0 8px 24px #0008;
  font: 700 13px/1 sans-serif;
  transform: translateX(-50%);
  pointer-events: auto;
}

.viewport-exit-editor:hover {
  border-color: #eba95d;
  background: #2a2529;
  color: #ffd9a8;
}

.viewport-exit-editor.hidden,
.tool-button.setup-tool-hidden,
.tool-button.setup-mode-hidden {
  display: none;
}

.exit-editor-icon {
  color: #eba95d;
  font-size: 12px;
}

.hierarchy-navigation-hint kbd {
  min-width: 22px;
  padding: 3px 5px;
  border: 1px solid #57515c;
  border-radius: 4px;
  background: #2a272e;
  color: #f1edf4;
  font: 700 11px/1 sans-serif;
  text-align: center;
}

.hierarchy-navigation-hint small {
  color: #96909b;
  font-size: 11px;
}

.viewport-tools {
  position: absolute;
  left: 18px;
  top: 72px;
  z-index: 3;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}

.viewport-modes {
  position: absolute;
  right: 18px;
  top: 72px;
  z-index: 3;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}

.viewport-setup {
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.viewport-setup .tool-button {
  width: 42px;
  min-height: 38px;
  padding: 0;
}

.setup-menu-shell {
  position: relative;
}

.setup-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 12;
  display: grid;
  width: 176px;
  padding: 6px;
  border: 1px solid #4a454e;
  border-radius: 6px;
  background: #1c1a20f5;
  box-shadow: 0 12px 30px #00000070;
  transform: translateX(-50%);
}

.setup-menu.hidden {
  display: none;
}

.setup-menu button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #ddd7df;
  text-align: left;
}

.setup-menu button:hover,
.setup-menu button.active {
  background: #2a272e;
  color: #83f7fc;
}

.setup-menu .tool-icon {
  margin: auto;
  transform: scale(0.78);
}

.icon-head-setup {
  width: 20px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 42% 42%;
}

.icon-head-setup::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: -5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.preset-library-glyph {
  display: grid;
  grid-template-columns: repeat(3, 7px);
  gap: 3px;
}

.preset-library-glyph i {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 1px;
}

.preset-library-button.active .preset-library-glyph i {
  border-color: #74edf3;
  background: #20464b;
}

.preset-library {
  position: absolute;
  inset: 70px 54px 28px;
  z-index: 8;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #4a454e;
  border-radius: 7px;
  background: #1b1a20f7;
  box-shadow: 0 20px 56px #00000085;
  pointer-events: auto;
}

.preset-library.hidden {
  display: none;
}

.preset-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 62px;
  padding: 12px 16px 12px 20px;
  border-bottom: 1px solid #353139;
  background: #201e24;
}

.preset-library-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.preset-library-head p {
  margin: 3px 0 0;
  color: #a69fa9;
  font-size: 12px;
}

.preset-library-head button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.hidden-file-input {
  display: none;
}

.preset-library-body {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  min-height: 0;
}

.preset-library-filters {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px 10px;
  border-right: 1px solid #353139;
  background: #17161b;
}

.preset-library-filters button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.preset-library-filters button:hover {
  background: #25232a;
}

.preset-library-filters button.active {
  border-color: #4c777b;
  background: #243338;
  color: #dffcff;
}

.preset-library-filters strong {
  min-width: 22px;
  color: #8f8993;
  font-size: 11px;
  text-align: right;
}

.preset-library-filters button.active strong {
  color: #75e8ef;
}

.preset-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-content: start;
  gap: 14px;
  overflow: auto;
  padding: 18px;
}

.preset-card {
  display: grid;
  grid-template-rows: minmax(196px, 1fr) auto;
  min-width: 0;
  min-height: 248px;
  padding: 0;
  overflow: hidden;
  border-color: #45404a;
  border-radius: 6px;
  background: #222027;
  color: #f1edf3;
  text-align: left;
}

.preset-card:hover {
  border-color: #6cdde5;
  background: #27242c;
}

.preset-card:focus-visible {
  outline: 2px solid #75e8ef;
  outline-offset: 2px;
}

.preset-card canvas,
.preset-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 196px;
  background: #29272e;
}

.preset-card img {
  object-fit: cover;
  object-position: center;
}

.preset-card .preset-card-image {
  transform: scale(1.75);
  transform-origin: 50% 48%;
}

.preset-card-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 9px 11px;
  border-top: 1px solid #3a363e;
  background: #222027;
}

.preset-card-label span {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-card-label small {
  color: #8f8993;
  font-size: 10px;
  text-transform: uppercase;
}

.preset-library-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed #45404a;
  border-radius: 6px;
  color: #8f8993;
}

.viewport-stats {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 9px 11px;
  border: 1px solid #3d3840;
  border-radius: 5px;
  background: #17161ae8;
  color: #aaa3ac;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.viewport-stats.hidden {
  display: none;
}

.viewport-stats div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.viewport-stats strong {
  color: #9eeff4;
  font-weight: 700;
}

.tool-button {
  width: 76px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 9px;
  font-weight: 800;
}

.tool-icon {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: currentColor;
}

.lattice-button {
  width: 44px;
  justify-self: end;
  padding: 0;
}

.scalp-paint-button {
  width: 44px;
  justify-self: end;
  padding: 0;
}

.curve-lattice-button {
  width: 44px;
  justify-self: end;
  padding: 0;
}

.group-color-button {
  width: 44px;
  justify-self: end;
  padding: 0;
}

.scalp-guide-visibility-button {
  width: 44px;
  padding: 0;
}

.scalp-guide-visibility-button.active {
  border-color: #58f6ff;
  background: #17363a;
  color: #8ff9ff;
}

.icon-scalp-guide {
  border: 1px solid currentColor;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 58% / 100% 1px no-repeat;
}

.icon-scalp-guide::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: -2px;
  height: 1px;
  background: currentColor;
}

.group-color-swatches {
  width: 22px;
  height: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.group-color-swatches i {
  border: 1px solid #ffffff66;
  border-radius: 2px;
}

.group-color-swatches i:nth-child(1) { background: #ef476f; }
.group-color-swatches i:nth-child(2) { background: #b967ff; }
.group-color-swatches i:nth-child(3) { background: #47c978; }
.group-color-swatches i:nth-child(4) { background: #4778e8; }

.group-color-button.active {
  border-color: #58f6ff;
  background: #17363a;
}

.icon-scalp-paint {
  border: 2px solid currentColor;
  border-radius: 50% 50% 46% 54%;
}

.icon-scalp-paint::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: -2px;
  bottom: -2px;
  border: 2px solid #242229;
  border-radius: 50%;
  background: currentColor;
}

.icon-scalp-paint::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 8px 2px 0 currentColor, 3px 9px 0 currentColor;
}

.icon-lattice {
  border: 1px solid currentColor;
  background:
    linear-gradient(currentColor, currentColor) 33% 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 67% 0 / 1px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 33% / 100% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 0 67% / 100% 1px no-repeat;
  transform: perspective(30px) rotateX(12deg) rotateY(-18deg);
}

.icon-lattice::before,
.icon-lattice::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border: 1px solid currentColor;
  background: #242229;
}

.icon-curve-lattice {
  border: 1px solid currentColor;
  border-radius: 5px 5px 2px 2px;
  background:
    radial-gradient(circle, currentColor 0 1.5px, transparent 1.8px) 0 0 / 50% 50%,
    linear-gradient(100deg, transparent 32%, currentColor 34% 36%, transparent 38% 65%, currentColor 67% 69%, transparent 71%),
    linear-gradient(4deg, transparent 31%, currentColor 33% 35%, transparent 37% 64%, currentColor 66% 68%, transparent 70%);
  transform: perspective(28px) rotateX(9deg) rotateY(-10deg);
}

.icon-lattice::before {
  left: -3px;
  top: -3px;
}

.icon-lattice::after {
  right: -3px;
  bottom: -3px;
}

.icon-select::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 12px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(-18deg);
}

.icon-select::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 13px;
  width: 8px;
  height: 3px;
  background: currentColor;
  transform: rotate(45deg);
}

.icon-move::before,
.icon-move::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 2px;
  width: 2px;
  height: 18px;
  background: currentColor;
}

.icon-move::after {
  left: 2px;
  top: 10px;
  width: 18px;
  height: 2px;
}

.icon-move {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-pull::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 13px;
  height: 15px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 0 12px;
  transform: rotate(-18deg);
}

.icon-pull::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(-28deg);
}

.icon-rotate {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.icon-rotate::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 1px;
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(35deg);
}

.icon-scale::before,
.icon-scale::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
}

.icon-scale::before {
  left: 3px;
  top: 7px;
  width: 12px;
  height: 12px;
}

.icon-scale::after {
  right: 2px;
  top: 2px;
  width: 7px;
  height: 7px;
  background: #242229;
}

.icon-relax::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 18px;
  height: 8px;
  border-bottom: 3px solid currentColor;
  border-radius: 0 0 18px 18px;
}

.icon-relax::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 7px;
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: rotate(18deg);
}

.icon-place::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-place::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 11px;
  width: 2px;
  height: 10px;
  background: currentColor;
  box-shadow: -5px 5px 0 -1px currentColor, 5px 5px 0 -1px currentColor;
}

.icon-draw::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 1px;
  width: 5px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 2px 2px 0 0;
  transform: rotate(42deg);
  transform-origin: center;
}

.icon-draw::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 16px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-radius: 50%;
  transform: rotate(-8deg);
}

.icon-braid::before,
.icon-braid::after {
  content: "";
  position: absolute;
  left: 5px;
  width: 12px;
  height: 7px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transform: rotate(-24deg);
}

.icon-braid::before {
  top: 2px;
  box-shadow: 0 7px 0 -1px #242229, 0 7px 0 1px currentColor;
}

.icon-braid::after {
  top: 15px;
  transform: rotate(24deg);
}

.icon-proportional::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 30%, transparent);
}

.icon-proportional::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.7;
}

.icon-collision::before,
.icon-collision::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 11px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-collision::before {
  left: 1px;
}

.icon-collision::after {
  right: 1px;
}

.tool-button.collision-button.active {
  border-color: #5be2eb;
  background: #17343a;
  color: #9af7ff;
}

.mirror-button {
  width: 44px;
  justify-self: end;
  padding: 0;
}

.icon-mirror-x::before,
.icon-mirror-x::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 7px;
  height: 14px;
  border: 2px solid currentColor;
}

.icon-mirror-x::before {
  left: 1px;
  border-radius: 7px 1px 1px 7px;
}

.icon-mirror-x::after {
  right: 1px;
  border-radius: 1px 7px 7px 1px;
}

.mirror-button.active {
  border-color: #ff73d1;
  background: #3a1f34;
  color: #ffb6e8;
}

.icon-space::before,
.icon-space::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
}

.icon-space::before {
  left: 3px;
  top: 3px;
  width: 12px;
  height: 12px;
}

.icon-space::after {
  right: 2px;
  bottom: 2px;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
}

.tool-button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.hierarchy-button {
  width: 76px;
  justify-content: center;
}

.tool-button kbd {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid #5a535b;
  border-radius: 4px;
  background: #121116;
  color: #cfc7bf;
  font: 700 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
}

.tool-button.active {
  border-color: #e7a95d;
  background: #3a2d1f;
  color: #ffd18e;
}

.hierarchy-button.active {
  border-color: #f0d95d;
  background: #332f18;
  color: #fff1a6;
}

.proportional-button.active {
  border-color: #8affcf;
  background: #1d342b;
  color: #adffe1;
}

.space-button.active {
  border-color: #75c9ff;
  background: #1b2c36;
  color: #b8e7ff;
}

.tool-button.active kbd {
  border-color: #e7a95d;
  color: #ffd18e;
}

.hierarchy-button.active kbd {
  border-color: #f0d95d;
  color: #fff1a6;
}

.proportional-button.active kbd {
  border-color: #8affcf;
  color: #adffe1;
}

.space-button.active kbd {
  border-color: #75c9ff;
  color: #b8e7ff;
}

.viewport-bar > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.viewport-bar strong {
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: 0;
}

.viewport-bar span {
  color: #c8c1ba;
  white-space: nowrap;
}

.bar-actions {
  pointer-events: auto;
}

.bar-actions button,
.section-head button {
  width: 38px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

#undoAction {
  width: auto;
  min-width: 70px;
  aspect-ratio: auto;
  padding: 0 12px;
}

.bar-actions .project-bar-action {
  width: auto;
  min-width: 52px;
  aspect-ratio: auto;
  padding: 0 10px;
}

#toggleWire.active {
  border-color: #58f6ff;
  background: #17363a;
  color: #8bfbff;
}

#undoAction:disabled {
  cursor: default;
  opacity: 0.42;
}

.tool-panel {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: auto;
  border-left: 1px solid #312c33;
  background: #1c1a20;
  padding: 14px;
}

#scalpPanel,
#scalpPaintPanel,
#scalpBuilderPanel,
#headPanel {
  order: -4;
}

#hierarchyPanel {
  order: -3;
}

#transformToolPanel,
#drawStrandToolPanel {
  order: -4;
}

#drawStrandToolPanel {
  order: -100;
}

.tool-panel > .active-tool-settings {
  order: -1000 !important;
}

#proportionalPanel {
  order: -2;
}

#selectedStrandPanel,
#groupSettingsPanel {
  order: 0;
}

#strandShapePanel {
  order: 1;
}

#strandTopologyPanel {
  order: 2;
}

#hairMaterialPanel {
  order: 3;
}

#guidePanel,
#presetPanel {
  order: 4;
}

.panel-section {
  padding: 0 0 14px;
  margin: 0 0 14px;
  border-bottom: 1px solid #332e35;
}

#scalpPanel.hidden {
  display: none;
}

#scalpPaintPanel.hidden {
  display: none;
}

#scalpBuilderPanel.hidden {
  display: none;
}

#generateScalpBuilder.hidden {
  display: none;
}

#headPanel.hidden {
  display: none;
}

.builder-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin: 2px 0 12px;
}

.builder-progress span {
  min-width: 0;
  padding: 6px 2px;
  border: 1px solid #3b3740;
  background: #242129;
  color: #77717d;
  font-size: 10px;
  text-align: center;
}

.builder-progress span.complete {
  border-color: #2a8790;
  color: #58f6ff;
}

.builder-progress span.active {
  background: #302334;
}

.builder-progress span:nth-child(1).active,
.builder-progress span:nth-child(1).complete { border-color: #ff52d3; color: #ff8de2; }
.builder-progress span:nth-child(2).active,
.builder-progress span:nth-child(2).complete { border-color: #38dbe7; color: #70edf5; }
.builder-progress span:nth-child(3).active,
.builder-progress span:nth-child(3).complete { border-color: #4d75ff; color: #88a0ff; }

.builder-step-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}

.builder-step-heading span {
  color: #8f8995;
  font-size: 11px;
  text-transform: uppercase;
}

.builder-step-heading strong {
  color: #f1edf3;
  font-size: 14px;
}

.builder-instruction {
  color: #aaa4ae;
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 12px;
}

.builder-position {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #aaa4ae;
}

.builder-position output {
  color: #58f6ff;
  font-variant-numeric: tabular-nums;
}

.icon-scalp-builder::before {
  content: "";
  position: absolute;
  inset: 3px 4px 4px;
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 50% 50% 42% 42%;
}

.icon-scalp-builder::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 2px;
  height: 12px;
  background: currentColor;
  transform: translateX(-50%);
}

#groupSettingsPanel.hidden,
#guidePanel.hidden,
#presetPanel.hidden,
#selectedStrandPanel.hidden,
#clumpGuidePanel.hidden,
#hairMaterialPanel.hidden,
#strandTopologyPanel.hidden,
#transformToolPanel.hidden,
#placeStrandToolPanel.hidden,
#drawStrandToolPanel.hidden,
#braidToolPanel.hidden,
#hierarchyPanel.hidden,
#proportionalPanel.hidden,
#strandShapePanel.hidden {
  display: none;
}

#braidToolPanel {
  order: -100;
}

#drawStrandToolPanel {
  order: -100;
}

#strandShapePanel {
  order: -99;
}

.braid-shape-controls {
  display: none;
}

.draw-shape-controls {
  display: none;
}

#strandShapePanel.braid-context .braid-shape-controls {
  display: contents;
}

#strandShapePanel.braid-context .strand-dimension-scale {
  display: none;
}

#strandShapePanel:not(.braid-context) .width-dimension-scale {
  display: none;
}

#strandShapePanel:not(.braid-context) .draw-shape-controls {
  display: contents;
}

#strandShapePanel .draw-coil-shape-controls {
  display: contents;
}

.transform-space-setting {
  display: grid;
  gap: 8px;
  color: #bdb6c0;
  font-size: 13px;
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border: 1px solid #3a353d;
  border-radius: 6px;
  background: #151419;
}

.segmented-control button {
  min-height: 30px;
  border: 0;
  background: transparent;
}

.segmented-control button.active {
  background: #4b3724;
  color: #ffd18e;
}

#groupSettingsPanel > label {
  grid-template-columns: 104px minmax(0, 1fr);
}

#groupSettingsPanel > .topology-control,
.sliders .topology-control {
  grid-template-columns: 104px minmax(0, 1fr) 24px;
}

.sliders .scalp-rough-scale-control {
  grid-template-columns: 78px minmax(0, 1fr) 34px 24px;
}

.sliders .head-transform-control {
  grid-template-columns: 104px minmax(0, 1fr) 34px 24px;
}

.axis-reset-control > input {
  grid-column: 2;
  grid-row: 1;
}

.axis-reset-control > output {
  grid-column: 3;
  grid-row: 1;
}

.axis-reset-control > button {
  grid-column: 4;
  grid-row: 1;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 4px;
  color: #aaa3ac;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.axis-reset-control > button:hover {
  border-color: #6cdde5;
  color: #dffcff;
}

#displayPanel .topology-control {
  grid-template-columns: 104px minmax(0, 1fr) 34px;
}

#viewPlaneMoveSetting.hidden,
#viewPlaneMoveSnappedSetting.hidden {
  display: none !important;
}

.view-plane-subsetting {
  padding-left: 12px;
  color: #aaa3ac;
}

.view-plane-subsetting.disabled {
  opacity: 0.45;
}

.slider-value {
  color: #9eeff4;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.profile-control-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.shape-preview-shell {
  position: relative;
  min-width: 0;
  line-height: 0;
}

.profile-preview {
  width: 86px;
  height: 86px;
  border: 1px solid #3d3840;
  border-radius: 5px;
  background: #17161a;
}

.profile-preview path {
  fill: #24373a;
  stroke: #58f6ff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.profile-preview .profile-preview-reference circle,
.profile-preview .profile-preview-reference line {
  fill: none;
  stroke: #b7c8ca2b;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.profile-preview .profile-preview-reference line {
  stroke: #d9e6e830;
}

.profile-origin-marker line {
  stroke: #ff37db;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.profile-preset-stack {
  display: grid;
  align-content: end;
  gap: 5px;
  min-width: 0;
}

.profile-offset-control {
  display: grid;
  grid-template-columns: 1fr 30px;
  gap: 4px 6px;
  margin: 0;
  color: #aaa3ac;
  font-size: 11px;
}

.profile-offset-control input {
  grid-column: 1 / -1;
  width: 100%;
}

.profile-offset-control output {
  grid-column: 2;
  grid-row: 1;
}

.shape-preset-select {
  align-self: center;
  min-width: 0;
  width: 100%;
  height: 36px;
}

.taper-curve-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  align-items: stretch;
}

.taper-curve-control .shape-preset-select {
  width: 100%;
}

.curve-heading-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 14px 0 6px;
}

.curve-heading-row .subsection-label {
  margin: 0;
}

.curve-heading-row .shape-preset-select {
  justify-self: stretch;
}

.taper-preview {
  width: 100%;
  height: 70px;
  border: 1px solid #3d3840;
  border-radius: 5px;
  background: #17161a;
}

.taper-preview path,
.taper-path {
  fill: #24373a;
  stroke: #58f6ff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.shape-edit-button {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
  width: 25px;
  min-width: 25px;
  min-height: 25px;
  padding: 0;
  border-color: #4a454e;
  border-radius: 4px;
  background: #18171bcc;
  color: #aaa4ad;
  opacity: 0.72;
}

.shape-preview-shell:hover .shape-edit-button,
.shape-edit-button:focus-visible {
  border-color: #5f8b8f;
  color: #8ff7fc;
  opacity: 1;
}

.pencil-glyph {
  position: relative;
  display: block;
  width: 12px;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 1px;
  transform: rotate(-45deg);
}

.pencil-glyph::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -1px;
  width: 0;
  height: 0;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-left: 3px solid currentColor;
}

.taper-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 26 / 11;
  border: 1px solid #464049;
  border-radius: 6px;
  background: #39383b;
  touch-action: none;
}

.taper-point-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.taper-point-controls label {
  display: grid;
  gap: 6px;
  color: #bdb6bf;
  font-size: 12px;
}

.taper-point-controls input,
.taper-point-controls select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 620px) {
  .taper-point-controls {
    grid-template-columns: 1fr;
  }
}

.topology-readout {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #3d3840;
  border-radius: 5px;
  background: #17161a;
  color: #9eeff4;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#scalpPanel > label:not(.toggle-row) {
  grid-template-columns: 92px minmax(0, 1fr);
}

#scalpPaintPanel > label {
  grid-template-columns: 92px minmax(0, 1fr);
}

.scalp-region-palette {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 10px 0 14px;
}

.region-button {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  text-align: left;
  font-size: 12px;
  line-height: 1.15;
}

.region-button.active {
  border-color: #f4f0ec;
  background: #343039;
}

.region-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid #ffffff7a;
  border-radius: 3px;
}

.region-bangs { background: #ef476f; }
.region-side-bangs-left { background: #b967ff; }
.region-side-bangs-right { background: #ffd166; }
.region-side-left { background: #47c978; }
.region-side-right { background: #36c9c6; }
.region-back { background: #4778e8; }
.region-unassigned { background: #77747d; }

.toggle-row {
  display: flex !important;
  justify-content: space-between;
  min-height: 34px;
}

#drawStrandToolPanel .toggle-row,
#braidToolPanel .toggle-row {
  align-items: center;
  min-height: 26px;
  margin: 3px 0;
}

.toggle-row input {
  width: 38px;
  height: 20px;
  appearance: none;
  border-radius: 10px;
  background: #3a353d;
  cursor: pointer;
  position: relative;
}

.toggle-row input::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #bcb5bd;
  transition: transform 120ms ease;
}

.toggle-row input:checked {
  background: #8b6533;
}

.toggle-row input:checked::after {
  transform: translateX(18px);
  background: #ffe0ad;
}

.wide-action {
  width: 100%;
  margin-top: 10px;
}

.wide-action.active {
  border-color: #e7a95d;
  color: #ffd18e;
  background: #30271f;
}

.subsection-label {
  margin: 16px 0 8px;
  color: #9f969f;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-section:last-child {
  border-bottom: 0;
}

.guide-controls.hidden {
  display: none;
}

.curve-lattice-controls.hidden {
  display: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #fff7ef;
  font-weight: 700;
}

label {
  display: block;
  color: #cfc7bf;
  font-size: 13px;
  margin: 12px 0 6px;
}

select,
input[type="text"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid #464048;
  border-radius: 6px;
  background: #121116;
  color: #fff7ef;
  padding: 0 10px;
}

.tool-panel select {
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.tool-panel .compact-select-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 6px 0;
}

.tool-panel .compact-select-row > span,
.tool-panel .compact-select-row > label {
  min-width: 0;
  margin: 0;
}

.material-select-setting .material-assign-row {
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
}

.material-select-setting .material-assign-row button {
  width: 30px;
  min-height: 30px;
  font-size: 17px;
}

input[type="color"] {
  width: 100%;
  height: 38px;
  border: 1px solid #464048;
  border-radius: 6px;
  background: #121116;
  padding: 4px;
}

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

.range-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.material-assign-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

.material-assign-row button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 20px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: #e7a95d;
}

.point-status {
  margin-top: 10px;
  color: #cfc7bf;
  font-size: 13px;
}

.point-status span {
  color: #ffd18e;
  font-weight: 800;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.creation-preset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 6px;
}

.creation-preset-row .compact-select-row {
  min-width: 0;
}

.creation-preset-add {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 4px;
  color: #bdfaff;
  font-size: 18px;
  line-height: 1;
}

.creation-preset-dialog {
  position: fixed;
  inset: 72px 372px auto auto;
  width: min(340px, calc(100vw - 48px));
  margin: 0;
  padding: 0;
  border: 1px solid #4a444f;
  border-radius: 6px;
  background: #1c1a20;
  color: #f3eef2;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

@media (max-width: 1000px) {
  .creation-preset-dialog {
    inset: 16px 16px auto auto;
  }
}

.creation-preset-dialog::backdrop {
  background: rgba(8, 7, 10, 0.18);
}

.creation-preset-dialog form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.creation-preset-dialog h2,
.creation-preset-dialog p {
  margin: 0;
}

.creation-preset-dialog p {
  margin-top: 3px;
  color: #aaa3ac;
  font-size: 12px;
}

.creation-preset-dialog label {
  color: #c8c1c9;
  font-size: 12px;
}

.creation-preset-dialog input {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #4a444f;
  border-radius: 4px;
  background: #121116;
  color: #f3eef2;
  font: inherit;
}

.creation-preset-dialog input:focus {
  outline: none;
  border-color: #54e7ef;
}

.sliders label {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.sliders label:not(.toggle-row):not(.profile-offset-control) {
  margin-top: 6px;
  margin-bottom: 3px;
}

.slider-input-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.slider-input-row input[type="range"] {
  width: 100%;
  min-width: 0;
}

.slider-number-input {
  width: 100%;
  min-width: 0;
  height: 25px;
  padding: 0 5px;
  border: 1px solid #3d3942;
  border-radius: 4px;
  background: #121116;
  color: #bdfaff;
  font: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.slider-number-input:focus {
  outline: none;
  border-color: #54e7ef;
}

.slider-reset-button {
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 4px;
  color: #aaa3ac;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.slider-reset-button:hover {
  border-color: #6cdde5;
  color: #dffcff;
}

.slider-generated-readout-hidden {
  display: none !important;
}

.sliders .topology-control.editable-slider-control,
#groupSettingsPanel > label.editable-slider-control,
#strandShapePanel > label.editable-slider-control,
#displayPanel .topology-control.editable-slider-control,
.sliders .head-transform-control.editable-slider-control {
  grid-template-columns: 104px minmax(0, 1fr);
}

.sliders .scalp-rough-scale-control.editable-slider-control {
  grid-template-columns: 78px minmax(0, 1fr);
}

.profile-offset-control.editable-slider-control {
  display: block;
}

.profile-offset-control.editable-slider-control .slider-input-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  margin-top: 4px;
}

.profile-offset-control.editable-slider-control .slider-input-row input {
  grid-column: auto;
  grid-row: auto;
  width: 100%;
}

.profile-offset-control.editable-slider-control .slider-input-row .slider-reset-button {
  grid-column: auto;
  grid-row: auto;
}

#strandShapePanel > label:not(.toggle-row) {
  grid-template-columns: 104px minmax(0, 1fr);
}

.slider-number-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.slider-number-pair input[type="range"],
.slider-number-pair input[type="number"] {
  width: 100%;
  min-width: 0;
}

.slider-number-pair.slider-input-row {
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  gap: 6px;
}

.lock-list {
  display: grid;
  gap: 3px;
  padding-top: 10px;
}

.outliner-group {
  min-width: 0;
}

.outliner-group-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  min-height: 34px;
  padding: 2px;
  border-radius: 4px;
  color: #ddd8d5;
  user-select: none;
}

.outliner-disclosure {
  width: 24px;
  min-height: 28px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #8c858e;
  font-size: 13px;
  transform-origin: center;
  transition: transform 120ms ease;
}

.outliner-group.open > .outliner-group-head .outliner-disclosure {
  transform: rotate(90deg);
}

.outliner-group-select {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 30px;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

.outliner-group-select:hover,
.outliner-group-select:focus-visible,
.outliner-disclosure:hover,
.outliner-disclosure:focus-visible {
  background: #26232a;
  color: #fff;
  outline: none;
}

.outliner-group-head.selected {
  background: #332b24;
  color: #ffe0ad;
  box-shadow: inset 2px 0 #e7a95d;
}

.outliner-group-swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #ffffff55;
  border-radius: 2px;
}

.outliner-group-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.outliner-group-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 8px;
  background: #2b2830;
  color: #a9a2ab;
  font-size: 11px;
  text-align: center;
}

.outliner-group-items {
  display: none;
  gap: 3px;
  margin: 2px 0 6px 20px;
  padding-left: 7px;
  border-left: 1px solid #39343c;
}

.outliner-group.open > .outliner-group-items {
  display: grid;
}

.outliner-layer {
  min-width: 0;
}

.outliner-layer-head {
  width: 100%;
  display: grid;
  grid-template-columns: 14px 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 6px 3px 2px;
  border-color: transparent;
  background: transparent;
  color: #aaa4ad;
  text-align: left;
  font-size: 12px;
}

.outliner-layer-head:hover,
.outliner-layer-head:focus-visible {
  background: #242128;
  color: #eee9ee;
  outline: none;
}

.outliner-layer-disclosure {
  text-align: center;
  transform-origin: center;
  transition: transform 120ms ease;
}

.outliner-layer.open > .outliner-layer-head .outliner-layer-disclosure {
  transform: rotate(90deg);
}

.outliner-layer-swatch {
  width: 10px;
  height: 10px;
  border: 1px solid #ffffff44;
  border-radius: 2px;
}

.outliner-layer-count {
  min-width: 18px;
  color: #77717b;
  text-align: right;
  font-size: 11px;
}

.outliner-layer-items {
  display: none;
  margin-left: 13px;
  padding-left: 7px;
  border-left: 1px solid #302c34;
}

.outliner-layer.open > .outliner-layer-items {
  display: grid;
}

.outliner-clump {
  min-width: 0;
  margin: 2px 0;
}

.outliner-clump-head.dragging {
  opacity: 0.35;
}

.outliner-clump-head {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 4px;
}

.outliner-clump-head:hover,
.outliner-clump-head.drop-target {
  border-color: #58f6ff55;
  background: #24242a;
}

.outliner-clump.selected > .outliner-clump-head {
  border-color: #e7a95d88;
  background: #332b24;
}

.outliner-clump-disclosure {
  width: 22px;
  min-height: 28px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #89838c;
  transform-origin: center;
  transition: transform 120ms ease;
}

.outliner-clump.open > .outliner-clump-head .outliner-clump-disclosure {
  transform: rotate(90deg);
}

.outliner-clump-select {
  width: 100%;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 29px;
  padding: 3px 7px 3px 2px;
  border-color: transparent;
  background: transparent;
  color: #d6d1d8;
  text-align: left;
}

.outliner-folder-icon {
  position: relative;
  width: 15px;
  height: 11px;
  border: 1px solid #65dce3;
  border-radius: 2px;
  background: #2b555a;
}

.outliner-folder-icon::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -4px;
  width: 7px;
  height: 4px;
  border: 1px solid #65dce3;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background: #2b555a;
}

.outliner-clump-count {
  color: #85808a;
  font-size: 11px;
}

.outliner-clump-children {
  display: none;
  margin-left: 17px;
  padding-left: 7px;
  border-left: 1px solid #385055;
}

.outliner-clump.open > .outliner-clump-children {
  display: grid;
}

.lock-item.clump-child {
  min-height: 29px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.lock-item.dragging {
  opacity: 0.35;
}

.lock-item.drop-target {
  border-color: #58f6ff;
  background: #20383b;
}

.clump-guide-status {
  padding: 7px 9px;
  border-left: 2px solid #58f6ff;
  background: #232128;
  color: #b9b3bd;
  font-size: 12px;
  line-height: 1.4;
}

.clump-shape-controls {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.clump-shape-controls.hidden {
  display: none;
}

.clump-guide-badge {
  justify-self: end;
  padding: 1px 5px;
  border: 1px solid #58f6ff66;
  border-radius: 3px;
  color: #7ef8ff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.lock-item.clump-guide-item {
  grid-template-columns: 18px minmax(0, 1fr) auto;
}

.outliner-empty {
  padding: 6px 9px;
  color: #77717a;
  font-size: 12px;
  font-style: italic;
}

.lock-item {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 32px;
  padding: 6px 8px;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
}

.lock-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lock-item.active {
  border-color: #e7a95d;
  background: #332b24;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #ffffff66;
}

.icon-danger:hover,
.icon-danger:focus-visible {
  border-color: #ef6a64;
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(440px, 58vh) auto auto;
    height: auto;
    min-height: 100vh;
  }

  .viewport-panel {
    min-height: 440px;
    order: 1;
  }

  .outliner-panel {
    order: 2;
    height: auto;
    max-height: 360px;
    border-right: 0;
    border-top: 1px solid #312c33;
  }

  .tool-panel {
    order: 3;
    height: auto;
    border-left: 0;
    border-top: 1px solid #312c33;
  }

  .preset-library {
    inset: 70px 12px 12px;
  }

  .preset-library-body {
    grid-template-columns: 142px minmax(0, 1fr);
  }

  .preset-library-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 560px) {
  .preset-library-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .preset-library-filters {
    grid-template-columns: repeat(3, 1fr);
    padding: 8px;
    border-right: 0;
    border-bottom: 1px solid #353139;
  }

  .preset-library-filters button {
    justify-content: center;
  }

  .preset-library-filters strong {
    display: none;
  }
}
