:root {
  color-scheme: dark;
  --tutorial-drawer-width: 340px;
  --cleanup-side-panel-width: 220px;
  --cleanup-side-panel-font-size: 12px;
  --cleanup-timeline-drawer-height: min(72vh, 620px);
  --panel: rgba(11, 15, 18, 0.92);
  --panel-line: rgba(243, 230, 196, 0.18);
  --text: #f4ead6;
  --muted: rgba(244, 234, 214, 0.66);
  --gold: #dfb45d;
  --green: #69b38a;
  --red: #d57d75;
  --blue: #78a7d8;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #10151a;
  color: var(--text);
  font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
}

[hidden] {
  display: none !important;
}

button,
select,
input {
  font: inherit;
}

.viewer-app {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  transition:
    grid-template-columns 180ms ease,
    width 180ms ease;
}

.weight-editor-app.is-side-panel-resizing {
  transition: none;
}

.animation-editor-app,
.weight-editor-app {
  grid-template-columns: minmax(0, 1fr);
}

.animation-editor-app .viewer-panel,
.weight-editor-app .viewer-panel {
  display: none;
}

.animation-editor-app.is-side-panel-open,
.weight-editor-app.is-side-panel-open {
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.animation-editor-app.is-side-panel-open .viewer-panel,
.weight-editor-app.is-side-panel-open .viewer-panel {
  display: flex;
}

.weight-editor-app.is-side-panel-open .viewer-panel {
  opacity: 1;
  transform: translateX(var(--cleanup-side-panel-drag-x, 0px));
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.weight-editor-app.is-side-panel-opening .viewer-panel {
  opacity: 1;
  pointer-events: none;
  transform: translateX(0);
}

.weight-editor-app.is-side-panel-closing .viewer-panel {
  opacity: 1;
  pointer-events: none;
  transform: translateX(var(--cleanup-side-panel-drag-x, 0px));
}

.weight-editor-app.is-side-panel-resizing .viewer-panel {
  transition: none;
}

.viewer-panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  border-right: 1px solid var(--panel-line);
  background: var(--panel);
  box-shadow: none;
}

.viewer-panel-scroll {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.viewer-panel-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
}

.settings-save-grid {
  display: grid;
  gap: 8px;
  padding-left: 4px;
}

.settings-save-row {
  display: grid;
  gap: 5px;
  padding-left: 4px;
}

.settings-save-row > span {
  color: rgba(244, 234, 214, 0.72);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.settings-save-actions {
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  margin-left: 10px;
}

.viewer-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.editor-control-panel .viewer-header {
  min-height: 78px;
  padding-right: 36px;
}

.panel-collapse-toggle,
.panel-show-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  width: 20px;
  min-height: 20px;
  padding: 0;
  line-height: 1;
}

.panel-collapse-toggle::before,
.panel-show-toggle::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.panel-collapse-toggle::before {
  transform: translateX(2px) rotate(135deg);
}

.panel-show-toggle::before {
  transform: translateX(-2px) rotate(-45deg);
}

.weight-editor-app:not(.is-side-panel-open) .panel-show-toggle {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 12;
  width: 12px;
  min-width: 12px;
  height: 84px;
  min-height: 84px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  cursor: ew-resize;
  font-size: 0;
  line-height: 0;
  transform: translateY(-50%);
}

.weight-editor-app:not(.is-side-panel-open) .panel-show-toggle::before {
  content: "";
  display: block;
  width: 8px;
  height: 84px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  border-left: 0;
  border-radius: 0 7px 7px 0;
  background: rgba(11, 15, 18, 0.96);
  box-shadow:
    inset 1px 0 0 rgba(255, 247, 223, 0.08),
    4px 0 12px rgba(0, 0, 0, 0.22);
  transform: none;
}

.weight-editor-app:not(.is-side-panel-open) .panel-show-toggle:hover,
.weight-editor-app:not(.is-side-panel-open) .panel-show-toggle:focus-visible {
  border: 0;
  background: transparent;
  color: transparent;
  outline: none;
}

.weight-editor-app:not(.is-side-panel-open) .panel-show-toggle:hover::before,
.weight-editor-app:not(.is-side-panel-open) .panel-show-toggle:focus-visible::before {
  border-color: rgba(223, 180, 93, 0.48);
  background: rgba(18, 24, 28, 0.98);
}

.panel-collapse-toggle {
  position: absolute;
  top: 0;
  right: 0;
}

.viewer-header-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.viewer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.viewer-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.viewer-brand-copy span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.viewer-logo {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.22));
}

.tutorials-toggle {
  position: absolute;
  top: 28px;
  right: 0;
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-color: rgba(223, 180, 93, 0.48);
  background: rgba(223, 180, 93, 0.12);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.tutorials-toggle[aria-expanded="true"] {
  border-color: rgba(223, 180, 93, 0.88);
  background: rgba(223, 180, 93, 0.28);
}

.viewer-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewer-header h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: 0;
}

.viewer-link,
.viewer-file span,
button {
  min-height: 34px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
}

.viewer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
}

.viewer-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--panel-line);
  background: rgba(255, 255, 255, 0.045);
}

.panel-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
}

.panel-section-heading .viewer-label {
  margin: 0;
}

.panel-section-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  line-height: 1;
}

.panel-section-toggle::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.viewer-section.is-panel-section-collapsed .panel-section-toggle::before {
  transform: translateX(-2px) rotate(-45deg);
}

.viewer-section.is-panel-section-collapsed {
  gap: 0;
}

.viewer-section.is-panel-section-collapsed > :not(.panel-section-heading) {
  display: none !important;
}

.animation-side-section {
  gap: 8px;
}

.animation-side-section select,
.animation-side-section button {
  min-height: 30px;
}

.animation-side-section .viewer-field {
  gap: 4px;
}

.animation-side-section .viewer-checks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.animation-side-section .import-options {
  grid-template-columns: minmax(0, 1fr);
}

.animation-side-section .animation-loop-options {
  grid-template-columns: repeat(3, minmax(54px, max-content));
  justify-content: start;
  gap: 2px 8px;
}

.animation-side-section .animation-display-options {
  grid-template-columns: repeat(3, minmax(54px, max-content));
  justify-content: start;
  gap: 2px 8px;
}

.animation-side-section .animation-loop-options label,
.animation-side-section .animation-display-options label {
  min-height: 20px;
  gap: 5px;
}

.travel-follow-option.is-hidden {
  display: none;
}

.animation-library-section {
  gap: 8px;
}

.animation-library-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}

.animation-library-inline-heading {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(244, 234, 214, 0.14);
}

.viewer-sub-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.animation-library-heading button,
.animation-library-section > button {
  min-height: 30px;
}

.animation-library-folder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
}

.animation-library-folder-row select {
  min-width: 0;
}

.animation-library-folder-row button {
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
}

.animation-library-folder-delete {
  width: 28px;
  border-color: rgba(244, 116, 98, 0.52);
  color: #ffd7ce;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.animation-library-folder-delete[aria-expanded="true"] {
  background: rgba(244, 116, 98, 0.18);
  border-color: rgba(244, 116, 98, 0.78);
}

.animation-library-folder-confirm {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px;
  border: 1px solid rgba(244, 116, 98, 0.5);
  border-radius: 6px;
  background: rgba(63, 25, 21, 0.86);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.animation-library-folder-confirm[hidden] {
  display: none;
}

.animation-library-folder-confirm span {
  min-width: 0;
  color: #ffe9e2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}

.animation-library-folder-confirm button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 10px;
}

#confirm-delete-animation-library-folder {
  border-color: rgba(244, 116, 98, 0.82);
  background: rgba(171, 54, 45, 0.72);
  color: #fff4ef;
}

.animation-library-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
}

.animation-library-create input {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  padding: 0 8px;
}

.animation-library-save-row,
.animation-library-save-as-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.animation-library-save-as-row {
  grid-template-columns: minmax(0, 1fr) 28px 28px;
}

.animation-library-save-as-row[hidden] {
  display: none;
}

.animation-library-save-as-row input {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  padding: 0 8px;
}

.animation-library-list {
  display: grid;
  gap: 5px;
  max-height: 132px;
  overflow: auto;
  padding: 5px;
  border: 1px solid rgba(120, 167, 216, 0.18);
  border-radius: 4px;
  background: rgba(25, 38, 47, 0.48);
}

.animation-library-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 5px;
}

.animation-library-file-row.is-engine-asset {
  grid-template-columns: minmax(0, 1fr);
}

.animation-library-file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  text-align: left;
  width: 100%;
  border-color: rgba(120, 167, 216, 0.28);
  background: rgba(21, 33, 42, 0.92);
  color: #eaf4f6;
}

.animation-library-file:hover:not(:disabled),
.animation-library-file:focus-visible {
  border-color: rgba(223, 180, 93, 0.52);
  background: rgba(36, 50, 58, 0.96);
}

.animation-library-file-row.is-engine-asset .animation-library-file {
  border-color: rgba(120, 167, 216, 0.34);
}

.animation-library-file-row.is-unavailable {
  opacity: 0.54;
}

.animation-library-file-delete {
  min-height: 30px;
  padding: 0;
  text-align: center;
}

.animation-library-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animation-library-file-meta,
.animation-library-empty {
  color: rgba(186, 215, 224, 0.72);
  font-size: 10px;
}

.animation-library-empty {
  margin: 0;
}

.motion-conversion-field select {
  border-color: rgba(223, 180, 93, 0.34);
  background: rgba(6, 9, 11, 0.82);
}

.viewer-field {
  display: grid;
  gap: 6px;
}

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

.viewer-range-row output {
  color: var(--text);
  font-size: 12px;
  text-align: right;
}

.viewer-field span,
.viewer-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(223, 180, 93, 0.5);
  background: #05080b;
  color: #fff7df;
}

select:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(223, 180, 93, 0.28);
  outline-offset: 1px;
}

select option {
  background: #05080b;
  color: #fff7df;
}

select option:hover,
select option:focus,
select option:checked {
  background: #06111f;
  color: #fff7df;
  box-shadow: 0 0 0 100vmax #06111f inset;
}

select option:disabled {
  color: rgba(255, 247, 223, 0.48);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

input[type="color"] {
  width: 100%;
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
}

.camera-color-field {
  gap: 6px;
}

.viewer-actions,
.viewer-segments,
.viewer-grid-actions,
.viewer-checks {
  display: grid;
  gap: 8px;
}

.viewer-actions,
.viewer-segments {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.viewer-subheading {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.viewer-segments {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.viewer-grid-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settings-save-section .settings-save-actions {
  grid-template-columns: minmax(0, 1fr);
}

.settings-save-section .settings-save-actions button {
  width: 100%;
}

.editor-presets {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-save-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weight-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.camera-view-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.camera-roll-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weight-actions #redistribute-chain-weights {
  grid-column: 1 / -1;
}

.cleanup-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clone-paint-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.clone-paint-actions button {
  padding: 0 5px;
  font-size: 11px;
}

.texture-paint-actions {
  display: grid;
  grid-template-columns: 34px minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 5px;
}

.selection-tool-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edit-tool-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edit-tool-actions [data-view-mode="edit"] {
  grid-column: span 2;
}

.texture-paint-actions button {
  min-height: 28px;
  padding: 0 6px;
  font-size: 11px;
}

.texture-paint-color {
  display: block;
  min-width: 0;
}

.texture-paint-color input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 2px;
}

.clone-paint-status {
  min-height: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.clone-paint-preview-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.clone-paint-preview-row figure {
  display: grid;
  gap: 3px;
  margin: 0;
}

.clone-paint-preview-row figure[hidden] {
  display: none;
}

.clone-paint-preview-row canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 234, 214, 0.16);
  background: rgba(0, 0, 0, 0.28);
  image-rendering: pixelated;
}

.clone-paint-preview-row figcaption {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.clone-paint-json-output {
  width: 100%;
  min-height: 72px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid rgba(244, 234, 214, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  line-height: 1.35;
}

.lasso-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lasso-overlay-path {
  fill: rgba(122, 247, 255, 0.1);
  stroke: rgba(122, 247, 255, 0.95);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tutorial-backdrop {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: rgba(5, 8, 10, 0.58);
  opacity: 0;
  transition: opacity 180ms ease;
}

.tutorial-backdrop.is-open {
  opacity: 1;
}

.tutorial-backdrop.is-highlight-mode {
  opacity: 0;
  pointer-events: none;
}

.tutorial-backdrop.is-macro-recording,
.tutorial-backdrop.is-macro-playback {
  opacity: 0;
  pointer-events: none;
}

.tutorial-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 39;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(var(--tutorial-drawer-width), calc(100vw - 20px));
  height: 100%;
  border-left: 1px solid rgba(223, 180, 93, 0.34);
  background: #11171c;
  box-shadow: -18px 0 42px rgba(0, 0, 0, 0.34);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.tutorial-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.tutorial-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(244, 234, 214, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.tutorial-drawer-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 158px;
}

.tutorial-drawer-actions button {
  min-width: 0;
  min-height: 26px;
  padding: 0 6px;
  font-size: 10px;
  line-height: 1;
}

.tutorial-demo-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 4px;
  width: 158px;
}

.tutorial-demo-controls[hidden] {
  display: none;
}

.tutorial-demo-controls button {
  width: 100%;
}

.tutorial-demo-controls select {
  min-width: 0;
  min-height: 26px;
  padding: 0 4px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  border-radius: 0;
  color: var(--text);
  background: rgba(12, 16, 20, 0.88);
  font: inherit;
  font-size: 10px;
}

.tutorial-demo-controls input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  height: 12px;
  accent-color: var(--gold);
}

.tutorial-card li .tutorial-demo-controls {
  margin-top: 7px;
}

.tutorial-eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-drawer h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0;
}

.tutorial-close {
  flex: 0 0 auto;
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.tutorial-drawer-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 10px;
  overflow: auto;
}

.tutorial-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(244, 234, 214, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.tutorial-card.is-active {
  border-color: rgba(223, 180, 93, 0.7);
  background: rgba(223, 180, 93, 0.09);
}

.tutorial-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
}

.tutorial-card ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
  color: rgba(244, 234, 214, 0.82);
  font-size: 11.5px;
  line-height: 1.28;
}

.tutorial-card li {
  border-radius: 4px;
  padding: 2px 4px;
}

.tutorial-card li.is-active {
  background: rgba(223, 180, 93, 0.18);
  color: var(--text);
}

.tutorial-card b {
  color: var(--text);
  font-weight: 800;
}

.tutorial-card-editor {
  display: grid;
  gap: 8px;
}

.tutorial-card-editor[hidden] {
  display: none;
}

.tutorial-card-editor label {
  display: grid;
  gap: 4px;
}

.tutorial-card-editor span {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tutorial-card-editor input,
.tutorial-card-editor textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(244, 234, 214, 0.22);
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.tutorial-card-editor input {
  min-height: 30px;
  padding: 0 8px;
}

.tutorial-card-editor textarea {
  min-height: 104px;
  padding: 8px;
  resize: vertical;
  line-height: 1.35;
}

.tutorial-card.is-editing {
  cursor: default;
}

.tutorial-card.is-editing > h3,
.tutorial-card.is-editing > ol {
  display: none;
}

.tutorial-highlight-target {
  outline: 2px solid rgba(255, 216, 128, 0.98);
  outline-offset: 3px;
  box-shadow:
    0 0 0 5px rgba(16, 21, 26, 0.82),
    0 0 24px rgba(223, 180, 93, 0.62);
  scroll-margin: 84px;
  animation: tutorial-highlight-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes tutorial-highlight-pulse {
  from {
    outline-color: rgba(255, 216, 128, 0.82);
    box-shadow:
      0 0 0 4px rgba(16, 21, 26, 0.72),
      0 0 14px rgba(223, 180, 93, 0.42);
  }

  to {
    outline-color: rgba(255, 239, 186, 1);
    box-shadow:
      0 0 0 6px rgba(16, 21, 26, 0.86),
      0 0 30px rgba(223, 180, 93, 0.78);
  }
}

.tutorial-macro-click-target {
  outline: 2px solid rgba(255, 239, 186, 1);
  outline-offset: 2px;
  box-shadow:
    0 0 0 4px rgba(16, 21, 26, 0.82),
    0 0 18px rgba(223, 180, 93, 0.7) !important;
  animation: tutorial-macro-target-flash 420ms ease-out;
}

.rig-bone-chain-members option.tutorial-macro-click-target {
  background: rgba(223, 180, 93, 0.72);
  color: #10151a;
}

@keyframes tutorial-macro-target-flash {
  from {
    transform: scale(0.98);
    filter: brightness(1.35);
  }

  to {
    transform: scale(1);
    filter: brightness(1);
  }
}

.tutorial-macro-pointer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  width: 14px;
  height: 22px;
  pointer-events: none;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
  transition: transform 90ms linear;
}

.tutorial-macro-pointer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f4ead6;
  clip-path: polygon(0 0, 0 18px, 4px 14px, 7px 22px, 10px 21px, 7px 13px, 14px 13px);
}

.tutorial-macro-pointer::after {
  content: "";
  position: absolute;
  top: -7px;
  left: -7px;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(244, 234, 214, 0.78);
  border-radius: 50%;
  opacity: 0;
}

.tutorial-macro-pointer.is-down::before {
  background: #dfb45d;
}

.tutorial-macro-pointer.is-click::after {
  animation: tutorial-macro-click 260ms ease-out;
}

@keyframes tutorial-macro-click {
  from {
    opacity: 0.95;
    transform: scale(0.5);
  }

  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

.texture-brush-cursor {
  position: absolute;
  z-index: 18;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(244, 234, 214, 0.96);
  border-radius: 999px;
  background: rgba(122, 247, 255, 0.045);
  box-shadow:
    0 0 0 1px rgba(16, 21, 26, 0.92),
    0 0 8px rgba(122, 247, 255, 0.28);
  pointer-events: none;
}

.texture-brush-cursor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(244, 234, 214, 0.98);
  box-shadow: 0 0 0 1px rgba(16, 21, 26, 0.8);
  transform: translate(-50%, -50%);
}

.texture-brush-cursor.is-clone {
  border-color: rgba(255, 211, 110, 0.96);
  background: rgba(255, 211, 110, 0.045);
  box-shadow:
    0 0 0 1px rgba(16, 21, 26, 0.92),
    0 0 8px rgba(255, 211, 110, 0.3);
}

.texture-brush-cursor.is-selection {
  border-color: rgba(223, 180, 93, 0.98);
  background: rgba(223, 180, 93, 0.055);
  box-shadow:
    0 0 0 1px rgba(16, 21, 26, 0.92),
    0 0 8px rgba(223, 180, 93, 0.24);
}

.texture-brush-cursor.is-selection::after {
  background: rgba(223, 180, 93, 0.98);
}

.texture-brush-cursor.is-selection.is-deselect {
  border-color: rgba(238, 118, 100, 0.98);
  background: rgba(238, 118, 100, 0.055);
  box-shadow:
    0 0 0 1px rgba(16, 21, 26, 0.92),
    0 0 8px rgba(238, 118, 100, 0.24);
}

.texture-brush-cursor.is-selection.is-deselect::after {
  background: rgba(238, 118, 100, 0.98);
}

.selection-influence-panel {
  display: grid;
  gap: 8px;
}

.selection-influence-list {
  display: grid;
  gap: 6px;
}

.selection-influence-row {
  display: grid;
  grid-template-columns: minmax(76px, 0.85fr) minmax(86px, 1fr) 42px;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

.selection-influence-row.is-active .selection-influence-name {
  color: var(--accent);
}

.selection-influence-name,
.selection-influence-value,
.selection-influence-empty {
  color: var(--text);
  font-size: 12px;
}

.selection-influence-value {
  color: var(--muted);
  text-align: right;
}

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

.rig-bone-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rig-bone-heading .viewer-label {
  margin: 0;
}

.rig-bone-heading button {
  width: 26px;
  min-width: 26px;
  min-height: 24px;
  padding: 0;
  line-height: 1;
}

.rig-bone-panel.is-collapsed .rig-panel-body {
  display: none;
}

.rig-panel-body {
  display: grid;
  gap: 8px;
}

.rig-bone-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.rig-bone-groups button {
  min-width: 0;
  min-height: 23px;
  padding: 0 7px;
  color: var(--muted);
  font-size: 11px;
}

.rig-bone-groups button[aria-pressed="true"] {
  border-color: rgba(223, 180, 93, 0.88);
  background: rgba(223, 180, 93, 0.18);
  color: var(--text);
}

.rig-bone-create {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rig-bone-create .rig-bone-wide {
  grid-column: 1 / -1;
}

.rig-bone-create .rig-bone-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rig-bone-transform-advanced {
  grid-column: 1 / -1;
}

.rig-bone-transform-advanced summary {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}

.rig-bone-transform-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 4px;
}

.rig-bone-transform-advanced:not([open]) .rig-bone-transform-grid {
  display: none;
}

.rig-bone-transform-advanced[open] .rig-bone-transform-grid {
  display: grid;
}

.rig-bone-transform-grid label {
  display: grid;
  gap: 3px;
}

.rig-bone-transform-grid span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.rig-bone-chain-members {
  grid-column: 1 / -1;
}

.rig-bone-chain-members select {
  min-height: 112px;
  max-height: 168px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rig-bone-chain-action {
  grid-column: 1 / -1;
}

.rig-subsection-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.rig-subsection-heading label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text);
  font-size: 9px;
  text-transform: none;
}

.joint-constraint-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
}

.joint-constraint-grid {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) minmax(0, 1fr);
  gap: 3px;
  align-items: center;
}

.joint-constraint-grid span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.joint-constraint-grid input {
  min-width: 0;
}

.joint-constraint-capture {
  display: grid;
  gap: 3px;
}

.joint-constraint-capture button {
  width: 100%;
}

.joint-constraint-advanced {
  display: grid;
  gap: 4px;
}

.joint-constraint-advanced summary {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
}

.joint-constraint-advanced .joint-constraint-grid {
  margin-top: 4px;
}

.joint-constraint-actions {
  grid-template-columns: 1fr;
}

.joint-constraint-template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 3px;
}

.joint-constraint-template-row:first-of-type {
  grid-template-columns: minmax(0, 1fr) auto;
}

.joint-constraint-template-row input,
.joint-constraint-template-row select {
  min-width: 0;
}

.ik-chain-settings {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
}

.rig-bone-create input[type="text"],
.rig-bone-create input[type="number"] {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  padding: 0 8px;
}

.rig-bone-create select[multiple] {
  min-height: 92px;
  padding: 6px 8px;
}

.rig-bone-list {
  display: grid;
  gap: 5px;
  max-height: 156px;
  overflow: auto;
  padding-right: 2px;
}

.rig-bone-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid rgba(244, 234, 214, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  text-align: left;
}

.rig-bone-item.is-active {
  border-color: rgba(223, 180, 93, 0.95);
  background: rgba(223, 180, 93, 0.18);
}

.rig-bone-item.is-chain-selected:not(.is-active) {
  border-color: rgba(92, 204, 173, 0.58);
  background: rgba(92, 204, 173, 0.1);
}

.rig-bone-name {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rig-bone-meta,
.rig-bone-empty,
.rig-bone-note {
  color: var(--muted);
  font-size: 10px;
}

.rig-bone-meta {
  text-transform: uppercase;
}

.rig-bone-empty,
.rig-bone-note {
  margin: 0;
}

button {
  padding: 0 10px;
}

button:hover,
.viewer-link:hover,
.viewer-file span:hover {
  border-color: rgba(223, 180, 93, 0.78);
  background: rgba(223, 180, 93, 0.14);
}

button.is-active {
  border-color: rgba(223, 180, 93, 0.95);
  background: rgba(223, 180, 93, 0.22);
}

.viewer-file {
  display: block;
}

.viewer-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.viewer-file span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.viewer-drop {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px dashed rgba(244, 234, 214, 0.32);
  color: var(--muted);
  text-align: center;
}

.viewer-drop.is-dragging {
  border-color: var(--green);
  color: var(--text);
  background: rgba(105, 179, 138, 0.13);
}

.viewer-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--muted);
  font-size: 13px;
}

.viewer-checks label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
}

.viewer-meta {
  margin-top: auto;
}

.viewer-meta dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.viewer-meta dl div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
}

.viewer-meta dt {
  color: var(--muted);
}

.viewer-meta dd {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#viewer-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(58, 74, 86, 0.4), rgba(17, 23, 26, 0.6)),
    #10151a;
}

#viewer-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.texture-airbrush-screen-layer {
  position: absolute;
  inset: 0;
  z-index: 17;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.weight-editor-app.is-texture-airbrush #viewer-canvas,
#viewer-canvas.is-texture-airbrush,
.weight-editor-app.is-selection-brush #viewer-canvas,
#viewer-canvas.is-selection-brush {
  cursor: none;
}

.weight-editor-app.is-clone-stamp #viewer-canvas,
#viewer-canvas.is-clone-stamp {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20d%3D%22M12%203h8l1%209H11z%22%20fill%3D%22%23f4ead6%22%20stroke%3D%22%2310151a%22%20stroke-width%3D%222%22/%3E%3Cpath%20d%3D%22M8%2013h16v7H8z%22%20fill%3D%22%23dfb45d%22%20stroke%3D%22%2310151a%22%20stroke-width%3D%222%22/%3E%3Cpath%20d%3D%22M6%2022h20v5H6z%22%20fill%3D%22%23f4ead6%22%20stroke%3D%22%2310151a%22%20stroke-width%3D%222%22/%3E%3Cpath%20d%3D%22M5%2029h22%22%20stroke%3D%22%23dfb45d%22%20stroke-width%3D%222%22/%3E%3C/svg%3E") 16 25, copy;
}

.weight-editor-app.is-texture-eyedropper #viewer-canvas,
#viewer-canvas.is-texture-eyedropper {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%2210%22%20fill%3D%22none%22%20stroke%3D%22%2310151a%22%20stroke-width%3D%223%22/%3E%3Cpath%20d%3D%22M16%203v8M16%2021v8M3%2016h8M21%2016h8%22%20fill%3D%22none%22%20stroke%3D%22%2310151a%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22/%3E%3Ccircle%20cx%3D%2216%22%20cy%3D%2216%22%20r%3D%2210%22%20fill%3D%22none%22%20stroke%3D%22%23f4ead6%22%20stroke-width%3D%221%22/%3E%3Cpath%20d%3D%22M16%203v8M16%2021v8M3%2016h8M21%2016h8%22%20fill%3D%22none%22%20stroke%3D%22%23f4ead6%22%20stroke-width%3D%221%22%20stroke-linecap%3D%22round%22/%3E%3C/svg%3E") 16 16, crosshair;
}

.clone-paint-actions #clone-paint-tool.is-active {
  border-color: rgba(105, 179, 138, 0.95);
  background: rgba(105, 179, 138, 0.24);
  color: #f4ead6;
}

.editor-controls {
  display: grid;
  gap: 9px;
}

.editor-control {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(110px, 1fr) 48px;
  align-items: center;
  gap: 8px;
}

.editor-control span,
.editor-control output {
  color: var(--muted);
  font-size: 12px;
}

.editor-control output {
  color: var(--text);
  text-align: right;
}

.param-layer-row .bone-layer-name {
  border-color: rgba(120, 167, 216, 0.38);
}

.param-layer-row.is-active .bone-layer-name {
  border-color: rgba(120, 167, 216, 0.95);
  background: rgba(120, 167, 216, 0.18);
}

.param-layer-row .bone-layer-key {
  background: var(--blue);
}

.editor-json {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid rgba(244, 234, 214, 0.28);
  background: rgba(0, 0, 0, 0.38);
  color: var(--text);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.weight-editor-app .viewer-panel {
  grid-template-columns: none;
  gap: 5px;
  padding: 0;
  font-size: var(--cleanup-side-panel-font-size);
}

.weight-editor-app .viewer-panel-scroll,
.weight-editor-app .viewer-panel-footer {
  gap: 5px;
  min-width: 0;
  overflow-x: hidden;
}

.weight-editor-app .viewer-panel-scroll {
  padding-right: 0;
}

.weight-editor-app.is-side-panel-narrow .viewer-panel {
  gap: 4px;
  padding: 0;
}

.weight-editor-app.is-side-panel-narrow .viewer-panel-scroll,
.weight-editor-app.is-side-panel-narrow .viewer-panel-footer {
  gap: 4px;
}

.weight-editor-app.is-side-panel-open {
  grid-template-columns: var(--cleanup-side-panel-width) minmax(0, 1fr);
}

.weight-editor-app.is-side-panel-opening {
  grid-template-columns: 0px minmax(0, 1fr);
}

.weight-editor-app .viewer-header {
  gap: 10px;
}

.weight-editor-app.is-side-panel-narrow .viewer-header {
  gap: 6px;
}

.weight-editor-app .viewer-logo {
  width: 34px;
  height: 34px;
}

.weight-editor-app.is-side-panel-narrow .viewer-logo {
  width: 28px;
  height: 28px;
}

.weight-editor-app .viewer-brand-copy span {
  font-size: calc(var(--cleanup-side-panel-font-size) - 4px);
}

.panel-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  width: 10px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  cursor: col-resize;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.panel-resize-handle:focus,
.panel-resize-handle:focus-visible,
.panel-resize-handle:active {
  outline: none;
  box-shadow: none;
}

.panel-resize-handle::before {
  content: "";
  display: none;
}

.weight-editor-app.is-side-panel-resizing,
.weight-editor-app.is-side-panel-resizing * {
  cursor: col-resize !important;
  user-select: none;
}

.weight-editor-app .viewer-panel .tutorials-toggle {
  top: 0;
  right: 3px;
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  font-size: calc(var(--cleanup-side-panel-font-size) - 1px);
}

.weight-editor-app .editor-control-panel .viewer-header {
  min-height: 42px;
  padding-right: 26px;
}

.weight-editor-app .editor-control-panel .panel-collapse-toggle {
  display: none;
}

.weight-editor-app .viewer-kicker {
  margin-bottom: 2px;
  font-size: calc(var(--cleanup-side-panel-font-size) - 3px);
}

.weight-editor-app .viewer-header h1 {
  font-size: calc(var(--cleanup-side-panel-font-size) + 6px);
  line-height: 1.05;
}

.weight-editor-app .viewer-section {
  gap: 7px;
  padding: 7px;
  width: 100%;
  min-width: 0;
  border-right: 0;
  border-left: 0;
}

.weight-editor-app.is-side-panel-narrow .viewer-section {
  gap: 5px;
  padding: 5px;
}

.weight-editor-app .viewer-field {
  gap: 4px;
}

.weight-editor-app .viewer-label,
.weight-editor-app .viewer-field span {
  font-size: calc(var(--cleanup-side-panel-font-size) - 2px);
  letter-spacing: 0.035em;
}

.weight-editor-app .viewer-range-row {
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 6px;
}

.weight-editor-app .viewer-range-row output {
  font-size: calc(var(--cleanup-side-panel-font-size) - 1px);
}

.weight-editor-app .viewer-actions,
.weight-editor-app .viewer-segments,
.weight-editor-app .viewer-grid-actions,
.weight-editor-app .viewer-checks {
  gap: 5px;
}

.weight-editor-app.is-side-panel-narrow .viewer-actions,
.weight-editor-app.is-side-panel-narrow .viewer-segments,
.weight-editor-app.is-side-panel-narrow .viewer-grid-actions,
.weight-editor-app.is-side-panel-narrow .viewer-checks {
  gap: 3px;
}

.weight-editor-app .viewer-checks {
  font-size: calc(var(--cleanup-side-panel-font-size) - 1px);
}

.weight-editor-app .viewer-link,
.weight-editor-app .viewer-file span,
.weight-editor-app .viewer-panel button {
  min-height: 28px;
  padding: 0 7px;
  font-size: calc(var(--cleanup-side-panel-font-size) - 1px);
  line-height: 1.05;
}

.weight-editor-app.is-side-panel-narrow .viewer-link,
.weight-editor-app.is-side-panel-narrow .viewer-file span,
.weight-editor-app.is-side-panel-narrow .viewer-panel button {
  min-height: 24px;
  padding: 0 5px;
}

.weight-editor-app .viewer-panel .panel-section-toggle,
.weight-editor-app .editor-control-panel .panel-collapse-toggle,
.weight-editor-app .panel-show-toggle {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  font-size: 0;
}

.weight-editor-app .viewer-panel select,
.weight-editor-app .viewer-panel input[type="text"],
.weight-editor-app .viewer-panel input[type="search"],
.weight-editor-app .viewer-panel input[type="number"],
.weight-editor-app .animation-library-create input,
.weight-editor-app .animation-library-save-as-row input,
.weight-editor-app .rig-bone-create input[type="text"],
.weight-editor-app .rig-bone-create input[type="number"] {
  min-height: 28px;
  padding: 0 7px;
  font-size: var(--cleanup-side-panel-font-size);
}

.weight-editor-app.is-side-panel-narrow .viewer-panel select,
.weight-editor-app.is-side-panel-narrow .viewer-panel input[type="text"],
.weight-editor-app.is-side-panel-narrow .viewer-panel input[type="search"],
.weight-editor-app.is-side-panel-narrow .viewer-panel input[type="number"],
.weight-editor-app.is-side-panel-narrow .animation-library-create input,
.weight-editor-app.is-side-panel-narrow .animation-library-save-as-row input,
.weight-editor-app.is-side-panel-narrow .rig-bone-create input[type="text"],
.weight-editor-app.is-side-panel-narrow .rig-bone-create input[type="number"] {
  min-height: 24px;
  padding: 0 5px;
}

.weight-editor-app .viewer-panel button,
.weight-editor-app .viewer-panel select,
.weight-editor-app .viewer-panel input,
.weight-editor-app .viewer-panel output {
  min-width: 0;
}

.weight-editor-app .viewer-panel button,
.weight-editor-app .viewer-panel select {
  overflow: hidden;
  text-overflow: ellipsis;
}

.weight-editor-app .viewer-panel .panel-resize-handle {
  width: 10px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  font-size: 0;
  line-height: 0;
  outline: none;
  box-shadow: none;
}

.weight-editor-app .viewer-panel input[type="range"] {
  min-width: 0;
}

.weight-editor-app .viewer-field.is-disabled {
  opacity: 0.45;
}

.weight-editor-app .rig-bone-create select[multiple] {
  min-height: 112px;
  max-height: 168px;
  padding: 5px 7px;
  font-size: var(--cleanup-side-panel-font-size);
  overflow-y: auto;
  overscroll-behavior: contain;
  text-overflow: clip;
}

.weight-editor-app .animation-library-heading button,
.weight-editor-app .animation-library-section > button,
.weight-editor-app .animation-import-section > button,
.weight-editor-app .animation-library-save-row button,
.weight-editor-app .animation-library-save-as-row button,
.weight-editor-app .animation-library-file,
.weight-editor-app .animation-library-file-delete {
  min-height: 26px;
  font-size: calc(var(--cleanup-side-panel-font-size) - 1px);
}

.weight-editor-app .animation-library-file-meta,
.weight-editor-app .animation-library-empty,
.weight-editor-app .rig-bone-meta,
.weight-editor-app .rig-bone-empty,
.weight-editor-app .rig-bone-note {
  font-size: calc(var(--cleanup-side-panel-font-size) - 3px);
}

.weight-editor-app .selection-influence-row {
  min-height: 24px;
}

.weight-editor-app .selection-influence-name,
.weight-editor-app .selection-influence-value,
.weight-editor-app .selection-influence-empty {
  font-size: calc(var(--cleanup-side-panel-font-size) - 1px);
}

.weight-editor-app.is-side-panel-tight .animation-library-create,
.weight-editor-app.is-side-panel-tight .animation-library-save-row,
.weight-editor-app.is-side-panel-tight .animation-library-save-as-row,
.weight-editor-app.is-side-panel-tight .viewer-actions,
.weight-editor-app.is-side-panel-tight .viewer-segments,
.weight-editor-app.is-side-panel-tight .viewer-grid-actions,
.weight-editor-app.is-side-panel-tight .settings-save-actions {
  grid-template-columns: minmax(0, 1fr);
}

.weight-editor-app.is-side-panel-tight .settings-save-actions {
  margin-left: 0;
}

.weight-editor-app.is-side-panel-tight .settings-save-row {
  padding-left: 2px;
}

.weight-editor-app.is-side-panel-tight .viewer-checks {
  grid-template-columns: minmax(0, 1fr);
}

.weight-json {
  min-height: 170px;
}

.weight-viewport-tools {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.viewport-tool-group {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  contain: layout paint style;
  min-width: 0;
  pointer-events: auto;
}

.viewport-edit-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  justify-self: start;
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
  pointer-events: none;
}

.viewport-edit-dock .viewport-tool-group {
  pointer-events: auto;
}

.weight-editor-app:not(.is-side-panel-open) .weight-viewport-tools,
.animation-editor-app:not(.is-side-panel-open) .weight-viewport-tools {
  padding-left: 34px;
}

.viewport-mode-group {
  flex: 1 1 330px;
  justify-self: end;
  margin-left: auto;
  max-width: 100%;
  flex-wrap: wrap;
  overflow: visible;
}

.viewport-mode-group button {
  max-width: 100%;
  min-width: 0;
}

.viewport-clean-preview-pair {
  display: inline-flex;
  flex: 0 1 auto;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
}

.weight-viewport-tools button {
  max-width: 100%;
  min-width: 0;
  min-height: 22px;
  overflow: hidden;
  padding: 0 5px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weight-viewport-tools .viewport-edit-only {
  display: none;
}

.weight-editor-app.is-3d-edit-mode .weight-viewport-tools .viewport-edit-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  .weight-viewport-tools {
    gap: 4px;
  }

  .viewport-edit-dock {
    gap: 4px;
  }

  .viewport-mode-group {
    max-width: 100%;
  }
}

.camera-gizmo {
  position: absolute;
  top: 64px;
  left: 14px;
  z-index: 5;
  display: grid;
  gap: 6px;
  width: 90px;
  padding: 7px;
  border: 1px solid rgba(244, 234, 214, 0.24);
  background: rgba(11, 15, 18, 0.94);
  contain: layout paint style;
  user-select: none;
}

.camera-gizmo-pad {
  position: relative;
  width: 72px;
  height: 72px;
  justify-self: center;
  border: 1px solid rgba(244, 234, 214, 0.36);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48%, rgba(244, 234, 214, 0.2) 48%, rgba(244, 234, 214, 0.2) 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(244, 234, 214, 0.2) 48%, rgba(244, 234, 214, 0.2) 52%, transparent 52%),
    rgba(17, 23, 28, 0.86);
  cursor: grab;
  touch-action: none;
}

.camera-gizmo-pad:active {
  cursor: grabbing;
}

.camera-gizmo-pad.is-dragging {
  border-color: rgba(223, 180, 93, 0.9);
  background:
    linear-gradient(90deg, transparent 48%, rgba(223, 180, 93, 0.26) 48%, rgba(223, 180, 93, 0.26) 52%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(223, 180, 93, 0.26) 48%, rgba(223, 180, 93, 0.26) 52%, transparent 52%),
    rgba(29, 25, 18, 0.9);
}

.camera-gizmo-axis {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid rgba(244, 234, 214, 0.28);
  border-radius: 50%;
  color: var(--text);
  background: rgba(0, 0, 0, 0.34);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  touch-action: none;
}

.camera-gizmo-axis-y {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.camera-gizmo-axis-x {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.camera-gizmo-axis-z {
  left: 50%;
  top: 50%;
  color: #11171c;
  background: rgba(223, 180, 93, 0.9);
  transform: translate(-50%, -50%);
}

.camera-gizmo-axis.is-dragging {
  border-color: rgba(223, 180, 93, 0.95);
  background: rgba(223, 180, 93, 0.24);
}

.camera-gizmo-axis-z.is-dragging {
  background: rgba(223, 180, 93, 0.95);
}

.weight-timeline-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  display: grid;
  gap: 3px;
  padding: 5px 6px;
  border: 1px solid rgba(244, 234, 214, 0.22);
  background: rgba(11, 15, 18, 0.96);
  box-shadow: none;
  contain: layout paint style;
  isolation: isolate;
  opacity: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateY(var(--cleanup-timeline-drawer-drag-y, 0px));
  transition:
    height 180ms ease,
    max-height 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.weight-editor-app:not(.is-timeline-compact) .weight-timeline-panel {
  grid-template-rows: auto auto auto auto;
  height: var(--cleanup-timeline-drawer-height, min(72vh, 620px));
  max-height: calc(100% - 2px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.weight-editor-app.is-timeline-compact .weight-timeline-panel {
  max-height: min(40vh, 218px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.weight-editor-app.is-timeline-drawer-dragging:not(.is-timeline-closing):not(.is-timeline-opening) .weight-timeline-panel {
  transition: none;
}

.weight-editor-app.is-timeline-opening .weight-timeline-panel,
.weight-editor-app.is-timeline-closing .weight-timeline-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 12px));
}

.timeline-drawer-handle {
  position: absolute;
  top: -6px;
  right: 0;
  left: 0;
  z-index: 8;
  width: auto;
  min-width: 0;
  height: 12px;
  min-height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ns-resize;
  font-size: 0;
  line-height: 0;
  touch-action: none;
}

.weight-timeline-toolbar {
  display: grid;
  align-items: center;
  justify-content: start;
  grid-template-columns: minmax(136px, 170px);
  gap: 4px;
}

.weight-timeline-toolbar .timeline-toolbar-bone-field {
  grid-template-columns: minmax(26px, max-content) minmax(82px, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 22px;
}

.weight-timeline-toolbar select {
  min-height: 22px;
}

.weight-editor-app .weight-timeline-panel button,
.weight-editor-app .weight-timeline-panel select,
.weight-editor-app .weight-timeline-panel input {
  font-size: 11px;
}

.weight-editor-app .weight-timeline-panel select {
  min-height: 28px;
  padding: 0 8px;
}

.animation-editor-app.is-timeline-compact .bone-layer-list {
  display: none;
}

.animation-editor-app.is-timeline-hidden .animation-timeline-panel {
  display: none;
}

.weight-editor-app.is-timeline-hidden .weight-timeline-panel {
  display: none;
}

.animation-editor-app.is-timeline-hidden .timeline-show-toggle,
.weight-editor-app.is-timeline-hidden .timeline-show-toggle {
  display: inline-flex;
}

.timeline-show-toggle {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 32px;
  padding: 0 8px;
  line-height: 1;
}

.weight-editor-app.is-timeline-hidden .timeline-show-toggle {
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  min-width: 0;
  height: 12px;
  min-height: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  cursor: ns-resize;
  font-size: 0;
  line-height: 0;
}

.weight-editor-app.is-timeline-hidden .timeline-show-toggle::before {
  content: "";
  width: 84px;
  height: 8px;
  border: 1px solid rgba(244, 234, 214, 0.28);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: rgba(11, 15, 18, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 223, 0.08),
    0 -4px 12px rgba(0, 0, 0, 0.22);
}

.weight-editor-app.is-timeline-hidden .timeline-show-toggle:hover,
.weight-editor-app.is-timeline-hidden .timeline-show-toggle:focus-visible {
  border: 0;
  background: transparent;
  color: transparent;
  outline: none;
}

.weight-editor-app.is-timeline-hidden .timeline-show-toggle:hover::before,
.weight-editor-app.is-timeline-hidden .timeline-show-toggle:focus-visible::before {
  border-color: rgba(223, 180, 93, 0.48);
  background: rgba(18, 24, 28, 0.98);
}

.animation-editor-app:not(.is-bird-target) .bird-only-section {
  display: none;
}

.animation-editor-tools {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.animation-editor-tools [hidden] {
  display: none !important;
}

.animation-editor-tools button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.animation-editor-tools button,
.timeline-layout-actions button {
  min-width: 28px;
  min-height: 32px;
  padding: 0 8px;
}

.timeline-pose-row,
.timeline-position-row,
.timeline-track-row,
.timeline-global-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

.timeline-global-row {
  grid-template-columns: minmax(118px, 0.55fr) minmax(150px, 0.8fr) minmax(160px, 0.72fr) minmax(136px, auto) minmax(176px, 1fr) minmax(128px, auto) minmax(126px, auto) minmax(160px, auto);
}

.timeline-target-field,
.timeline-speed-field,
.timeline-scale-field,
.timeline-blend-field {
  display: grid;
  align-items: center;
  gap: 8px;
}

.timeline-target-field {
  grid-template-columns: 62px minmax(0, 1fr);
}

.timeline-speed-field {
  grid-template-columns: 46px minmax(120px, 1fr) 42px;
}

.timeline-scale-field {
  grid-template-columns: 42px minmax(92px, 1fr) 48px;
}

.timeline-blend-field {
  grid-template-columns: 32px minmax(92px, 1fr) 36px;
}

.timeline-target-field select {
  min-width: 0;
}

.timeline-target-field span,
.timeline-speed-field span,
.timeline-scale-field span,
.timeline-blend-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.timeline-speed-field output,
.timeline-scale-field output,
.timeline-blend-field output,
.timeline-status {
  color: var(--muted);
  font-size: 12px;
}

.timeline-status {
  margin: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-layout-actions {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 3px;
}

.timeline-layout-actions button {
  width: 22px;
  min-width: 22px;
  min-height: 22px;
  padding: 0;
}

.animation-editor-app .animation-timeline-panel button {
  min-width: 0;
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.animation-editor-app .animation-timeline-panel .timeline-key-marker {
  width: 6px;
  min-width: 0;
  height: 5px;
  min-height: 0;
  padding: 0;
  font-size: 0;
}

.animation-editor-app .animation-timeline-panel .viewer-actions,
.animation-editor-app .animation-timeline-panel .timeline-layout-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.animation-editor-app .animation-timeline-panel .timeline-layout-actions {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  grid-template-columns: repeat(2, max-content);
  gap: 6px;
}

.animation-editor-app .animation-timeline-panel .timeline-layout-actions button {
  width: auto;
  min-width: 24px;
  min-height: 22px;
  padding: 0 5px;
  font-size: 11px;
}

.animation-editor-app .animation-timeline-panel .timeline-status {
  display: none;
}

.animation-editor-app .animation-timeline-panel {
  font-size: 12px;
}

.animation-editor-app .timeline-target-field span,
.animation-editor-app .timeline-scale-field span,
.animation-editor-app .timeline-speed-field span,
.animation-editor-app .timeline-blend-field span,
.animation-editor-app .timeline-bone-field span,
.animation-editor-app .timeline-rot-field span,
.animation-editor-app .timeline-frame-readout {
  font-size: 10px;
}

.animation-editor-app .timeline-scale-field output,
.animation-editor-app .timeline-speed-field output,
.animation-editor-app .timeline-blend-field output,
.animation-editor-app .timeline-pose-row .timeline-rot-field output,
.animation-editor-app .timeline-position-row .timeline-rot-field output {
  font-size: 10px;
}

.animation-editor-app .animation-timeline-panel select {
  min-height: 24px;
  font-size: 12px;
}

.animation-editor-app .timeline-pose-actions button {
  min-height: 24px;
  font-size: 11px;
}

.animation-editor-app.is-timeline-compact .animation-timeline-panel {
  gap: 6px;
  padding: 8px;
}

.animation-editor-app.is-timeline-compact .timeline-global-row,
.animation-editor-app.is-timeline-compact .timeline-pose-row,
.animation-editor-app.is-timeline-compact .timeline-position-row,
.animation-editor-app.is-timeline-compact .timeline-track-row {
  gap: 6px;
}

.animation-editor-app.is-timeline-compact .timeline-global-row {
  padding-left: 58px;
}

.animation-editor-app.is-timeline-compact .timeline-pose-row {
  padding-left: 58px;
}

.animation-editor-app.is-timeline-compact .timeline-target-field,
.animation-editor-app.is-timeline-compact .timeline-scale-field,
.animation-editor-app.is-timeline-compact .timeline-speed-field,
.animation-editor-app.is-timeline-compact .timeline-bone-field,
.animation-editor-app.is-timeline-compact .timeline-rot-field {
  gap: 2px;
}

.animation-editor-app.is-timeline-compact .timeline-target-field span,
.animation-editor-app.is-timeline-compact .timeline-scale-field span,
.animation-editor-app.is-timeline-compact .timeline-speed-field span,
.animation-editor-app.is-timeline-compact .timeline-bone-field span,
.animation-editor-app.is-timeline-compact .timeline-rot-field span,
.animation-editor-app.is-timeline-compact .timeline-frame-readout {
  font-size: 10px;
}

.animation-editor-app.is-timeline-compact .timeline-scale-field output,
.animation-editor-app.is-timeline-compact .timeline-speed-field output,
.animation-editor-app.is-timeline-compact .timeline-pose-row .timeline-rot-field output,
.animation-editor-app.is-timeline-compact .timeline-position-row .timeline-rot-field output {
  font-size: 10px;
}

.animation-editor-app.is-timeline-compact .animation-timeline-panel button,
.animation-editor-app.is-timeline-compact .animation-timeline-panel select {
  min-height: 24px;
  font-size: 12px;
}

.animation-editor-app.is-timeline-compact .animation-timeline-panel .timeline-layout-actions {
  top: 6px;
  left: 6px;
  gap: 4px;
}

.animation-editor-app.is-timeline-compact .animation-timeline-panel .timeline-layout-actions button {
  min-width: 24px;
  min-height: 22px;
  padding: 0 5px;
  font-size: 11px;
}

.animation-editor-app.is-timeline-compact .animation-timeline-panel .timeline-key-marker {
  width: 6px;
  min-width: 0;
  height: 5px;
  min-height: 0;
  padding: 0;
  font-size: 0;
}

.animation-editor-app.is-timeline-compact .timeline-pose-actions button {
  min-height: 24px;
  font-size: 11px;
}

.animation-editor-app.is-timeline-compact .timeline-track {
  min-height: 22px;
}

.animation-editor-app .timeline-global-row {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
  padding-left: 70px;
}

.animation-editor-app .timeline-target-field {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}

.animation-editor-app .timeline-scale-field,
.animation-editor-app .timeline-speed-field,
.animation-editor-app .timeline-blend-field {
  grid-template-columns: minmax(0, 1fr) minmax(34px, 42px);
  grid-template-areas:
    "label label"
    "slider value";
  gap: 3px 6px;
}

.animation-editor-app .timeline-scale-field span,
.animation-editor-app .timeline-speed-field span,
.animation-editor-app .timeline-blend-field span {
  grid-area: label;
}

.animation-editor-app .timeline-scale-field input,
.animation-editor-app .timeline-speed-field input,
.animation-editor-app .timeline-blend-field input {
  grid-area: slider;
}

.animation-editor-app .timeline-scale-field output,
.animation-editor-app .timeline-speed-field output,
.animation-editor-app .timeline-blend-field output {
  grid-area: value;
  justify-self: end;
  font-size: 11px;
}

.timeline-pose-row {
  grid-template-columns: minmax(120px, 160px) repeat(3, minmax(148px, 1fr)) minmax(78px, auto) minmax(78px, auto);
  gap: 8px;
}

.animation-editor-app .timeline-pose-row {
  grid-template-columns: minmax(130px, 0.85fr) repeat(3, minmax(134px, 1fr));
  padding-left: 58px;
}

.weight-editor-app .timeline-pose-row {
  position: relative;
  grid-template-columns: minmax(104px, 128px) minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.weight-editor-app .timeline-transport-controls {
  display: grid;
  grid-template-columns: max-content max-content max-content max-content;
  grid-template-areas: "play frame opts keys";
  align-items: center;
  gap: 2px 4px;
  width: auto;
  min-width: 0;
}

.weight-editor-app .timeline-transport-controls #timeline-play-toggle {
  grid-area: play;
}

.weight-editor-app .timeline-transport-controls .timeline-frame-readout {
  grid-area: frame;
  align-self: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weight-editor-app .timeline-transport-controls .timeline-playback-options {
  grid-area: opts;
}

.weight-editor-app .timeline-transport-controls .timeline-key-actions {
  grid-area: keys;
  justify-self: start;
}

.timeline-position-row {
  grid-template-columns: repeat(3, minmax(148px, 1fr));
  gap: 8px;
}

.weight-editor-app .timeline-position-row {
  grid-template-columns: minmax(172px, 220px) repeat(3, minmax(104px, 1fr)) minmax(40px, 48px);
  gap: 6px;
}

.weight-editor-app .timeline-position-row .timeline-rot-field:nth-child(1) {
  grid-column: 2;
}

.weight-editor-app .timeline-position-row .timeline-rot-field:nth-child(2) {
  grid-column: 3;
}

.weight-editor-app .timeline-position-row .timeline-rot-field:nth-child(3) {
  grid-column: 4;
}

.weight-editor-app .timeline-loop-action {
  grid-column: auto;
  align-self: stretch;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1;
  white-space: normal;
}

.animation-editor-app .timeline-position-row {
  grid-template-columns: minmax(130px, 0.85fr) repeat(3, minmax(134px, 1fr));
}

.timeline-track-row {
  grid-template-columns: 76px 92px minmax(0, 1fr) minmax(260px, auto) 64px;
}

.weight-editor-app .timeline-track-row:not(.timeline-sequence-row) {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.weight-editor-app .timeline-track-row:not(.timeline-sequence-row) .timeline-track {
  grid-column: 1 / -1;
  min-height: 22px;
}

.animation-editor-app.is-side-panel-open .timeline-track-row {
  grid-template-columns: minmax(58px, auto) minmax(72px, auto) minmax(0, 1fr);
}

.animation-editor-app.is-side-panel-open .timeline-key-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.timeline-sequence-row {
  grid-template-columns: minmax(76px, auto) 92px minmax(0, 1fr) minmax(150px, auto);
}

.timeline-blend-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
  text-align: right;
}

.timeline-sequence-track {
  display: grid;
  gap: 5px;
}

.sequence-phase-track {
  --sequence-source-width: 33.333%;
  --sequence-mix-width: 33.333%;
  --sequence-target-width: 33.333%;
  display: grid;
  grid-template-columns: minmax(34px, var(--sequence-source-width)) minmax(34px, var(--sequence-mix-width)) minmax(34px, var(--sequence-target-width));
  gap: 3px;
}

.sequence-phase-track span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 18px;
  padding: 0 5px;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 214, 0.13);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.sequence-phase-track span.is-active {
  border-color: rgba(223, 180, 93, 0.74);
  background: rgba(223, 180, 93, 0.16);
  color: var(--text);
}

.sequence-phase-track b,
.sequence-phase-track output {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sequence-phase-track output {
  margin-left: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.animation-editor-app:not(.has-blend-target) .timeline-sequence-row {
  opacity: 0.48;
}

.weight-editor-app:not(.has-blend-target) .timeline-sequence-row {
  display: none;
}

.timeline-bone-field,
.timeline-rot-field {
  display: grid;
  gap: 5px;
}

.weight-editor-app .timeline-bone-field,
.weight-editor-app .timeline-rot-field,
.animation-editor-app .timeline-rot-field {
  min-width: 0;
}

.timeline-bone-field span,
.timeline-rot-field span,
.timeline-frame-readout {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-frame-label {
  margin-right: 0.25em;
}

.weight-editor-app .timeline-bone-field span,
.weight-editor-app .timeline-rot-field span,
.weight-editor-app .timeline-frame-readout {
  font-size: 9px;
  letter-spacing: 0;
}

.timeline-rot-field {
  grid-template-columns: 52px minmax(68px, 1fr) 68px;
  align-items: center;
  gap: 6px;
}

.weight-editor-app .timeline-rot-field {
  grid-template-columns: minmax(36px, max-content) minmax(38px, 1fr) minmax(42px, 52px);
  align-items: center;
  min-height: 24px;
  gap: 3px;
  max-width: 100%;
  overflow: hidden;
}

.weight-editor-app .timeline-rot-field input[type="range"] {
  min-width: 0;
  width: 100%;
}

.animation-editor-app .timeline-pose-row .timeline-rot-field,
.animation-editor-app .timeline-position-row .timeline-rot-field {
  grid-template-columns: minmax(44px, max-content) minmax(0, 1fr);
  grid-template-areas:
    "label slider"
    ". value";
  gap: 2px 6px;
}

.animation-editor-app .timeline-pose-row .timeline-rot-field span,
.animation-editor-app .timeline-position-row .timeline-rot-field span {
  grid-area: label;
}

.animation-editor-app .timeline-pose-row .timeline-rot-field input[type="range"],
.animation-editor-app .timeline-position-row .timeline-rot-field input[type="range"] {
  grid-area: slider;
}

.animation-editor-app .timeline-pose-row .timeline-rot-field output,
.animation-editor-app .timeline-position-row .timeline-rot-field output {
  grid-area: value;
  justify-self: stretch;
}

.timeline-rot-field span {
  text-transform: none;
  letter-spacing: 0;
}

.timeline-rot-field output {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
}

.timeline-value-input {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 0 5px;
  border: 1px solid rgba(244, 234, 214, 0.22);
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: right;
}

.weight-editor-app .timeline-value-input {
  min-height: 22px;
  max-width: 100%;
  font-size: 10px;
}

.weight-editor-app .timeline-rot-field output {
  font-size: 11px;
}

.animation-editor-app .timeline-pose-row .timeline-rot-field output,
.animation-editor-app .timeline-position-row .timeline-rot-field output {
  font-size: 10px;
}

.timeline-pose-row button {
  min-width: 78px;
  padding: 0 8px;
}

.weight-editor-app .timeline-pose-row button {
  min-width: 0;
  min-height: 22px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 1.05;
}

.timeline-transform-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 3px 6px;
  align-self: start;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.timeline-main-stack {
  display: grid;
  align-self: start;
  gap: 3px;
  min-width: 0;
}

.weight-editor-app .timeline-main-stack {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "toolbar"
    "transforms"
    "actions";
  gap: 2px;
}

.weight-editor-app .timeline-main-stack .weight-timeline-toolbar {
  grid-area: toolbar;
}

.weight-editor-app .timeline-main-stack .timeline-transform-controls {
  grid-area: transforms;
}

.weight-editor-app .timeline-main-stack .timeline-action-strip {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.weight-editor-app .timeline-action-strip .timeline-transport-controls,
.weight-editor-app .timeline-action-strip .timeline-pose-key-actions {
  flex: 0 0 auto;
}

.weight-editor-app .timeline-action-strip .timeline-pose-key-actions {
  margin-left: auto;
}

.timeline-pose-tools {
  display: grid;
  align-self: stretch;
  grid-template-rows: minmax(16px, auto) auto;
  gap: 2px;
}

.timeline-bone-tool-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
}

.timeline-bone-tool {
  align-self: end;
  min-height: 36px;
}

.weight-editor-app .timeline-pose-tools .timeline-bone-tool {
  align-self: stretch;
  min-height: 16px;
  height: 16px;
  padding: 0 3px;
  font-size: 9px;
  line-height: 1;
}

.weight-editor-app .timeline-pose-tools .timeline-fk-mode[hidden],
.weight-editor-app .timeline-pose-tools .timeline-ik-settings[hidden] {
  display: none !important;
}

.weight-editor-app .timeline-pose-tools .timeline-fk-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  min-height: 17px;
}

.weight-editor-app .timeline-pose-tools .timeline-fk-mode label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 17px;
  padding: 0 4px;
  border: 1px solid rgba(246, 181, 86, 0.38);
  border-radius: 4px;
  background: rgba(9, 15, 18, 0.92);
  color: #fff7df;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.weight-editor-app .timeline-pose-tools .timeline-fk-mode label:has(input:checked) {
  border-color: rgba(255, 207, 126, 0.92);
  background: rgba(255, 185, 76, 0.2);
  color: #ffffff;
}

.weight-editor-app .timeline-pose-tools .timeline-fk-mode input {
  width: 9px;
  height: 9px;
  margin: 0;
}

.weight-editor-app .timeline-pose-tools .timeline-ik-settings {
  grid-column: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.weight-editor-app .timeline-ik-settings .viewer-field {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-height: 0;
  gap: 1px;
}

.weight-editor-app .timeline-ik-settings .viewer-field.is-hidden {
  display: none;
}

.weight-editor-app .timeline-ik-settings .viewer-field.is-disabled {
  opacity: 0.42;
  color: rgba(179, 186, 188, 0.72);
}

.weight-editor-app .timeline-ik-settings .viewer-field span {
  font-size: 7px;
  line-height: 1;
}

.weight-editor-app .timeline-ik-settings .ik-counter-rotation-field {
  margin-top: 3px;
}

.weight-editor-app .timeline-ik-settings:has(#ik-solver-mode option[value="smooth"]:checked) .ik-counter-rotation-field {
  color: inherit;
}

.weight-editor-app .timeline-ik-settings .ik-counter-rotation-field.is-disabled {
  opacity: 1;
}

.weight-editor-app .timeline-ik-settings .ik-counter-rotation-field.is-disabled span,
.weight-editor-app .timeline-ik-settings .ik-counter-rotation-field.is-disabled output,
.weight-editor-app .timeline-ik-settings:has(#ik-solver-mode option[value="smooth"]:checked) .ik-counter-rotation-field span,
.weight-editor-app .timeline-ik-settings:has(#ik-solver-mode option[value="smooth"]:checked) .ik-counter-rotation-field output {
  color: rgba(174, 181, 184, 0.7);
}

.weight-editor-app .timeline-ik-settings .ik-counter-rotation-field.is-disabled input[type="range"],
.weight-editor-app .timeline-ik-settings:has(#ik-solver-mode option[value="smooth"]:checked) .ik-counter-rotation-field input[type="range"] {
  filter: grayscale(1);
}

.weight-editor-app .timeline-ik-settings select,
.weight-editor-app .timeline-ik-settings input[type="range"] {
  min-height: 17px;
}

.weight-editor-app .timeline-ik-settings .viewer-range-row {
  grid-template-columns: minmax(0, 1fr) minmax(28px, auto);
  gap: 3px;
}

.weight-editor-app .timeline-ik-settings output {
  min-width: 28px;
  font-size: 9px;
}

.weight-editor-app .timeline-adaptive-convert-button[hidden] {
  display: none;
}

.timeline-pose-actions {
  display: grid;
  position: absolute;
  top: 0;
  right: 0;
  align-self: start;
  gap: 3px;
  z-index: 5;
}

.timeline-pose-actions .timeline-layout-actions {
  grid-column: 1 / -1;
  justify-content: end;
}

.weight-editor-app .timeline-pose-actions #timeline-compact-toggle,
.weight-editor-app .timeline-pose-actions #timeline-hide-toggle {
  display: none;
}

.timeline-pose-key-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.timeline-pose-actions button {
  min-width: 0;
  width: 100%;
  min-height: 22px;
  padding: 0 4px;
  font-size: 10px;
}

.weight-editor-app .timeline-pose-key-actions button {
  flex: 0 0 auto;
  min-width: 32px;
  width: auto;
  min-height: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 9px;
  line-height: 1;
}

.weight-editor-app .timeline-pose-key-actions #copy-pose {
  margin-left: 4px;
}

.weight-editor-app .timeline-pose-actions .timeline-loop-action {
  min-height: 27px;
  font-size: 9px;
}

.timeline-track {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 28px;
}

.timeline-track input {
  position: relative;
  z-index: 2;
  margin: 0;
}

.timeline-keys {
  position: absolute;
  right: 6px;
  bottom: 0;
  left: 6px;
  height: 5px;
  pointer-events: none;
}

.timeline-key-marker {
  position: absolute;
  top: 0;
  width: 6px;
  height: 5px;
  padding: 0;
  min-width: 0;
  min-height: 0;
  transform: translateX(-50%);
  border: 0;
  background: var(--red);
  pointer-events: auto;
}

.timeline-key-marker.is-adaptive {
  background: #7fc8ff;
}

.timeline-key-marker.is-authored {
  background: var(--red);
}

.timeline-key-marker.is-ik {
  background: #d996ff;
}

.timeline-key-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  gap: 8px;
}

.weight-editor-app .timeline-key-actions {
  grid-template-columns: repeat(4, minmax(30px, max-content));
  gap: 2px;
  justify-content: start;
}

.weight-editor-app .timeline-playback-options {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.weight-editor-app .timeline-playback-options label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 16px;
  color: rgba(244, 234, 214, 0.82);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.weight-editor-app .timeline-playback-options input {
  width: 10px;
  height: 10px;
  margin: 0;
}

.weight-editor-app .timeline-key-actions button,
.weight-editor-app .timeline-transport-controls #timeline-play-toggle {
  min-height: 18px;
  padding: 0 4px;
  font-size: 9px;
  line-height: 1.05;
}

.curve-channel-field {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.curve-channel-field span,
.bone-layer-curve-toolbar output {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.bone-layer-curve-toolbar output {
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bone-layer-curve-canvas {
  display: block;
  width: 100%;
  height: 112px;
  border: 1px solid rgba(244, 234, 214, 0.16);
  background: rgba(0, 0, 0, 0.3);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.bone-layer-curve-stage {
  position: relative;
  min-width: 0;
  overscroll-behavior: contain;
}

.bone-layer-curve-playhead {
  position: absolute;
  z-index: 2;
  width: 2px;
  transform: translateX(-1px);
  background: rgba(213, 125, 117, 0.95);
  pointer-events: none;
}

.bone-layer-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding-top: 2px;
}

.weight-editor-app:not(.is-timeline-compact) .bone-layer-list {
  align-self: stretch;
  grid-row: 4 / 5;
  height: auto;
  overflow: visible;
}

.bone-layer-row {
  display: block;
  flex: 0 0 auto;
  min-height: 24px;
}

.bone-layer-row.is-expanded {
  padding: 4px;
  border: 1px solid rgba(223, 180, 93, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.bone-layer-header {
  display: grid;
  grid-template-columns: 24px minmax(128px, 172px) minmax(154px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.bone-layer-row.is-expanded .bone-layer-header {
  grid-template-columns: 24px minmax(112px, 156px) minmax(136px, auto) minmax(380px, 1fr);
  gap: 6px;
}

.bone-layer-expand-toggle {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-color: rgba(244, 234, 214, 0.2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.bone-layer-row.is-active .bone-layer-name {
  border-color: rgba(223, 180, 93, 0.95);
  background: rgba(223, 180, 93, 0.2);
}

.bone-layer-row.is-mirror-active .bone-layer-name {
  border-color: rgba(111, 190, 255, 0.78);
  background: rgba(111, 190, 255, 0.14);
}

.bone-layer-name {
  min-height: 24px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(244, 234, 214, 0.18);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bone-layer-values {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 4px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  white-space: nowrap;
}

.bone-layer-track {
  position: relative;
  height: 16px;
  border: 1px solid rgba(244, 234, 214, 0.12);
  background: rgba(255, 255, 255, 0.055);
  background-repeat: no-repeat;
}

.weight-editor-app .bone-layer-track {
  pointer-events: none;
}

.bone-layer-key {
  position: absolute;
  top: 2px;
  width: 7px;
  height: 10px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  background: var(--gold);
}

.bone-layer-curve-panel {
  display: grid;
  gap: 0;
  clear: both;
  margin-left: 32px;
  margin-top: 5px;
  margin-bottom: 0;
  padding: 4px;
  border: 1px solid rgba(223, 180, 93, 0.22);
  border-left: 2px solid rgba(223, 180, 93, 0.68);
  background: rgba(0, 0, 0, 0.2);
}

.bone-layer-curve-toolbar {
  display: grid;
  grid-template-columns: minmax(142px, 178px) repeat(3, minmax(58px, 76px)) minmax(80px, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.weight-editor-app .bone-layer-curve-toolbar button {
  min-height: 24px;
  padding: 0 5px;
  font-size: 10px;
  line-height: 1;
}

.weight-editor-app .bone-layer-curve-toolbar select {
  min-height: 24px;
  padding: 0 5px;
  font-size: 10px;
}

.bone-labels {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.bone-label {
  position: absolute;
  max-width: 126px;
  padding: 2px 5px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(244, 234, 214, 0.22);
  background: rgba(11, 15, 18, 0.72);
  color: rgba(244, 234, 214, 0.9);
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .viewer-app,
  .tutorial-backdrop,
  .tutorial-drawer,
  .tutorial-highlight-target {
    transition: none;
    animation: none;
  }
}

@media (min-width: 761px) and (min-height: 561px) {
  .viewer-app.is-tutorial-drawer-open {
    width: calc(100vw - var(--tutorial-drawer-width));
  }
}

@media (max-width: 760px), (max-height: 560px) {
  .tutorial-drawer {
    width: min(100vw, var(--tutorial-drawer-width));
  }

  .tutorial-drawer-header {
    padding: 14px;
  }

  .tutorial-drawer-actions {
    max-width: 152px;
  }

  .tutorial-demo-controls {
    width: 152px;
  }

  .tutorial-drawer-actions button {
    min-height: 28px;
    padding: 0 6px;
    font-size: 10px;
  }

  .tutorial-drawer h2 {
    font-size: 21px;
  }

  .tutorial-drawer-body {
    padding: 10px;
  }

  .viewer-app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .viewer-panel,
  .weight-editor-app .viewer-panel {
    order: 2;
    max-height: 34vh;
    padding: 5px;
    border-top: 1px solid var(--panel-line);
    border-right: 0;
  }

  .weight-editor-app .viewer-section {
    gap: 5px;
    padding: 6px;
  }

  .weight-editor-app .viewer-panel button,
  .weight-editor-app .viewer-panel select,
  .weight-editor-app .viewer-panel input[type="text"],
  .weight-editor-app .viewer-panel input[type="search"],
  .weight-editor-app .viewer-panel input[type="number"] {
    min-height: 24px;
  }

  .viewer-stage {
    order: 1;
  }

  .weight-editor-app.is-side-panel-open {
    grid-template-columns: var(--cleanup-side-panel-width) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .weight-editor-app.is-side-panel-opening {
    grid-template-columns: 0px minmax(0, 1fr);
  }

  .weight-editor-app.is-side-panel-open .viewer-panel {
    display: flex;
    order: 0;
    width: auto;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    height: auto;
    border-top: 0;
    border-right: 1px solid var(--panel-line);
  }

  .weight-editor-app.is-side-panel-open .viewer-stage {
    order: 1;
  }

  .weight-timeline-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: minmax(0, 1fr);
    max-height: min(72vh, 540px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 3px;
  }

  .weight-editor-app:not(.is-timeline-compact) .weight-timeline-panel {
    height: var(--cleanup-timeline-drawer-height, min(72vh, 540px));
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .weight-editor-app.is-timeline-compact .weight-timeline-panel {
    max-height: min(40vh, 218px);
  }

  .weight-editor-app:not(.is-timeline-compact) .bone-layer-list {
    max-height: none;
    overflow: visible;
  }

  .timeline-show-toggle {
    left: 8px;
    bottom: 8px;
  }

  .animation-side-section .viewer-checks:not(.import-options) {
    grid-template-columns: minmax(0, 1fr);
  }

  .weight-timeline-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-right: 44px;
  }

  .timeline-pose-row,
  .timeline-position-row,
  .timeline-track-row,
  .timeline-global-row,
  .bone-layer-header,
  .bone-layer-curve-toolbar {
    grid-template-columns: 1fr;
  }

  .weight-editor-app .timeline-position-row .timeline-rot-field {
    grid-column: auto;
  }

  .weight-editor-app .timeline-position-row .timeline-rot-field:nth-child(1),
  .weight-editor-app .timeline-position-row .timeline-rot-field:nth-child(2),
  .weight-editor-app .timeline-position-row .timeline-rot-field:nth-child(3) {
    grid-column: auto;
  }

  .weight-editor-app .timeline-loop-action {
    grid-column: auto;
    justify-self: stretch;
    width: 100%;
  }

  .weight-editor-app .timeline-pose-row {
    grid-template-columns: minmax(86px, 104px) minmax(0, 1fr) minmax(38px, max-content);
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 3px 4px;
    min-width: 0;
  }

  .weight-editor-app .timeline-pose-tools {
    grid-column: 1;
    grid-row: 1;
  }

  .weight-editor-app .timeline-main-stack {
    display: contents;
  }

  .weight-editor-app .timeline-main-stack .weight-timeline-toolbar {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    min-width: 0;
    padding-right: 0;
  }

  .weight-editor-app .timeline-main-stack .timeline-transform-controls {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .weight-editor-app .timeline-main-stack .timeline-action-strip {
    display: contents;
  }

  .weight-editor-app .timeline-transport-controls {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: max-content max-content max-content max-content;
    width: auto;
    min-width: 0;
  }

  .weight-editor-app .timeline-main-stack .timeline-pose-key-actions {
    display: grid;
    grid-column: 2 / 4;
    grid-row: 1;
    grid-auto-columns: max-content;
    grid-auto-flow: column;
    align-items: center;
    align-self: end;
    justify-self: stretch;
    justify-content: end;
    gap: 3px;
    margin-left: 0;
    box-sizing: border-box;
    overflow: visible;
  }

  .weight-editor-app .timeline-transport-controls .timeline-frame-label {
    display: none;
  }

  .weight-editor-app .timeline-ik-settings .ik-counter-rotation-field .viewer-range-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "value"
      "slider";
    gap: 1px;
  }

  .weight-editor-app .timeline-ik-settings .ik-counter-rotation-field input[type="range"] {
    grid-area: slider;
  }

  .weight-editor-app .timeline-ik-settings .ik-counter-rotation-field output {
    grid-area: value;
    justify-self: end;
    min-width: 0;
  }

  .weight-editor-app .timeline-transform-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 4px;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(6) {
    grid-column: 2;
    grid-row: 3;
  }

  .weight-editor-app .timeline-rot-field {
    grid-template-columns: minmax(32px, max-content) minmax(0, 1fr) minmax(42px, 52px);
    grid-template-areas: "label slider value";
    gap: 1px 3px;
    min-height: 22px;
  }

  .weight-editor-app .timeline-rot-field span {
    grid-area: label;
  }

  .weight-editor-app .timeline-rot-field input[type="range"] {
    grid-area: slider;
  }

  .weight-editor-app .timeline-rot-field .timeline-value-input {
    grid-area: value;
    min-height: 18px;
  }

  .animation-editor-app .timeline-transform-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .weight-editor-app .timeline-pose-actions {
    position: static;
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    grid-template-columns: minmax(38px, max-content);
  }

  .weight-editor-app .timeline-pose-actions .timeline-layout-actions {
    justify-content: end;
  }

  .bone-layer-curve-panel {
    margin-left: 0;
  }

  .bone-layer-row.is-expanded .bone-layer-header {
    grid-template-columns: 24px minmax(96px, 156px) minmax(0, 1fr);
    grid-template-areas:
      "toggle name values"
      "toolbar toolbar toolbar";
    gap: 4px 6px;
  }

  .bone-layer-row.is-expanded .bone-layer-expand-toggle {
    grid-area: toggle;
  }

  .bone-layer-row.is-expanded .bone-layer-name {
    grid-area: name;
  }

  .bone-layer-row.is-expanded .bone-layer-values {
    grid-area: values;
    grid-template-columns: repeat(3, minmax(38px, max-content));
    justify-content: start;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
  }

  .bone-layer-row.is-expanded .bone-layer-curve-toolbar {
    grid-area: toolbar;
    grid-template-columns: minmax(118px, 1fr) repeat(3, minmax(44px, max-content)) minmax(52px, 0.7fr);
    gap: 3px;
    width: 100%;
  }

  .bone-layer-row.is-expanded .curve-channel-field {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 3px;
  }

  .weight-editor-app .bone-layer-row.is-expanded .bone-layer-curve-toolbar button,
  .weight-editor-app .bone-layer-row.is-expanded .bone-layer-curve-toolbar select {
    min-height: 22px;
    padding: 0 4px;
    font-size: 9px;
  }

  .bone-layer-row.is-expanded .bone-layer-curve-toolbar output {
    font-size: 9px;
  }

  .timeline-key-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weight-editor-app .timeline-track-row:not(.timeline-sequence-row) {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    min-width: 0;
  }

  .weight-editor-app .timeline-position-row {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .weight-editor-app .timeline-track-row:not(.timeline-sequence-row) .timeline-track {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .weight-editor-app .timeline-key-actions {
    grid-template-columns: repeat(4, max-content);
    width: auto;
  }
}

@media (max-width: 480px) {
  .weight-editor-app .timeline-pose-row,
  .weight-editor-app .timeline-position-row,
  .weight-editor-app .timeline-track-row:not(.timeline-sequence-row) {
    grid-template-columns: minmax(0, 1fr);
  }

  .weight-editor-app .timeline-transform-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .weight-editor-app .weight-timeline-toolbar {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .weight-editor-app .weight-timeline-toolbar .timeline-toolbar-bone-field {
    grid-column: 1 / -1;
    grid-template-columns: minmax(32px, max-content) minmax(0, 1fr);
    width: 100%;
  }

  .weight-editor-app .timeline-transform-controls .timeline-rot-field:nth-child(n) {
    grid-column: 1;
    grid-row: auto;
  }

  .weight-editor-app .timeline-rot-field {
    grid-template-columns: minmax(34px, max-content) minmax(0, 1fr) minmax(40px, 50px);
    grid-template-areas: "label slider value";
  }

  .weight-editor-app .timeline-pose-tools,
  .weight-editor-app .timeline-transport-controls,
  .weight-editor-app .timeline-main-stack,
  .weight-editor-app .timeline-pose-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .weight-editor-app .timeline-main-stack {
    display: grid;
  }

  .weight-editor-app .timeline-pose-actions {
    display: grid;
    position: absolute;
    top: 4px;
    right: 4px;
    grid-template-columns: 24px;
    gap: 0;
    z-index: 9;
  }

  .weight-editor-app .timeline-pose-actions .timeline-layout-actions {
    display: grid;
    grid-template-columns: 24px;
    gap: 0;
  }

  .weight-editor-app .timeline-pose-actions .timeline-layout-actions button {
    min-width: 24px;
    width: 24px;
    min-height: 22px;
    height: 22px;
    padding: 0;
    font-size: 10px;
  }

  .weight-editor-app .timeline-pose-actions #timeline-hide-toggle,
  .weight-editor-app .timeline-pose-actions .timeline-loop-action {
    display: none;
  }

  .timeline-drawer-handle {
    top: -6px;
    height: 12px;
    min-height: 12px;
  }

  .weight-editor-app .timeline-transport-controls {
    display: contents;
    grid-template-areas:
      "play frame"
      "opts opts"
      "keys keys";
  }

  .weight-editor-app .timeline-main-stack {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "toolbar"
      "transforms"
      "actions";
  }

  .weight-editor-app .timeline-main-stack .weight-timeline-toolbar {
    grid-column: 1;
    grid-row: 1;
    justify-self: stretch;
    width: 100%;
  }

  .weight-editor-app .timeline-main-stack .timeline-transform-controls {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
  }

  .weight-editor-app .timeline-main-stack .timeline-action-strip {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(6, max-content) minmax(0, 1fr);
    grid-template-areas:
      "play frame opts opts opts opts ."
      "delete clear convert key . . ."
      "prev next copy paste . . .";
    align-items: center;
    gap: 3px 6px;
    width: 100%;
  }

  .weight-editor-app .timeline-transport-controls .timeline-frame-readout {
    grid-area: frame;
  }

  .weight-editor-app .timeline-transport-controls .timeline-playback-options {
    grid-area: opts;
  }

  .weight-editor-app .timeline-transport-controls .timeline-key-actions,
  .weight-editor-app .timeline-main-stack .timeline-pose-key-actions {
    display: contents;
  }

  .weight-editor-app .timeline-transport-controls #timeline-play-toggle {
    grid-area: play;
  }

  .weight-editor-app .timeline-key-actions #prev-key {
    grid-area: prev;
  }

  .weight-editor-app .timeline-key-actions #next-key {
    grid-area: next;
  }

  .weight-editor-app .timeline-pose-key-actions #delete-key {
    grid-area: delete;
  }

  .weight-editor-app .timeline-pose-key-actions #clear-keys {
    grid-area: clear;
  }

  .weight-editor-app .timeline-pose-key-actions #convert-adaptive-key {
    grid-area: convert;
  }

  .weight-editor-app .timeline-pose-key-actions #key-current-pose {
    grid-area: key;
  }

  .weight-editor-app .timeline-pose-key-actions #copy-pose {
    grid-area: copy;
    margin-left: 0;
  }

  .weight-editor-app .timeline-pose-key-actions #paste-pose {
    grid-area: paste;
  }

  .weight-editor-app .timeline-ik-settings .ik-counter-rotation-field .viewer-range-row {
    grid-template-columns: minmax(0, 1fr) minmax(28px, auto);
    grid-template-areas: "slider value";
    gap: 3px;
  }

  .weight-editor-app .timeline-ik-settings .ik-counter-rotation-field input[type="range"] {
    grid-area: slider;
  }

  .weight-editor-app .timeline-ik-settings .ik-counter-rotation-field output {
    grid-area: value;
    justify-self: end;
    min-width: 28px;
  }

  .bone-layer-row.is-expanded .bone-layer-header {
    grid-template-columns: 24px minmax(0, 1fr);
    grid-template-areas:
      "toggle name"
      "values values"
      "toolbar toolbar";
  }

  .bone-layer-row.is-expanded .bone-layer-curve-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bone-layer-row.is-expanded .curve-channel-field,
  .bone-layer-row.is-expanded .bone-layer-curve-toolbar output {
    grid-column: 1 / -1;
  }

  .weight-editor-app .timeline-track-row:not(.timeline-sequence-row) .timeline-track {
    grid-column: 1;
    grid-row: auto;
  }

  .weight-editor-app .timeline-key-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px), (max-height: 560px) {
  .animation-editor-tools {
    top: 8px;
    left: 8px;
  }

  .weight-viewport-tools {
    top: 0;
    left: 0;
    right: 0;
    gap: 3px;
  }

  .viewport-tool-group {
    gap: 2px;
    padding: 2px;
  }

  .viewport-edit-dock {
    gap: 3px;
  }

  .viewport-mode-group {
    max-width: 100%;
  }

  .animation-editor-app .timeline-global-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .animation-editor-app .timeline-pose-row,
  .animation-editor-app .timeline-position-row {
    grid-template-columns: minmax(104px, 0.8fr) repeat(3, minmax(96px, 1fr));
  }

.animation-editor-app .timeline-track-row {
  grid-template-columns: minmax(58px, auto) minmax(74px, auto) minmax(0, 1fr);
}

.animation-editor-app .timeline-sequence-row {
  grid-template-columns: minmax(58px, auto) minmax(74px, auto) minmax(0, 1fr) minmax(112px, auto);
}

.animation-editor-app .timeline-key-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

  .animation-editor-app .timeline-bone-field {
    min-width: 0;
  }

  .animation-editor-app .timeline-target-field {
    grid-template-columns: minmax(42px, max-content) minmax(0, 1fr);
  }

  .animation-editor-app .animation-timeline-panel button {
    min-height: 28px;
    padding: 0 6px;
    font-size: 13px;
  }
}
