/* ObjectBuilder-JS — global styles.
   Dark theme borrowed from the AS3 app (#494949 chrome, #2d2d2d title bars). */

/* ---- reset --------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: #494949;
    color: #e6e6e6;
    font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu,
        Cantarell, "Helvetica Neue", Arial, sans-serif;
    min-width: 800px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

button {
    font: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 600;
}

/* ---- header bar ---------------------------------------------------- */

.app-header {
    flex: 0 0 auto;
    padding: 6px 12px;
    background: #2d2d2d;
    border-bottom: 1px solid #1c1c1c;
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.app-header h1 {
    font-size: 13px;
    letter-spacing: 0.02em;
}

.app-header__sub {
    margin: 0;
    font-size: 11px;
    color: #9a9a9a;
}

/* ---- menu bar ------------------------------------------------------ */

.app-menu {
    flex: 0 0 auto;
    background: #3a3a3a;
    border-bottom: 1px solid #1c1c1c;
}

.menu {
    display: flex;
    height: 24px;
}

.menu__top {
    position: relative;
}

.menu__top-label {
    background: transparent;
    border: 0;
    padding: 0 10px;
    height: 100%;
    color: #d8d8d8;
    cursor: pointer;
    font-size: 12px;
}

.menu__top-label:hover,
.menu__top.is-open .menu__top-label {
    background: #5a5a5a;
    color: #fff;
}

.menu__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #3a3a3a;
    border: 1px solid #1c1c1c;
    padding: 4px 0;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.menu__top.is-open .menu__dropdown {
    display: block;
}

.menu__item {
    display: block;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    padding: 5px 18px 5px 26px;
    color: #d8d8d8;
    cursor: pointer;
    font-size: 12px;
    position: relative;
}

.menu__item:hover {
    background: #1f6db3;
    color: #fff;
}

.menu__item:disabled {
    color: #777;
    cursor: default;
}

.menu__item:disabled:hover {
    background: transparent;
    color: #777;
}

.menu__item.is-checked::before {
    content: "✓";
    position: absolute;
    left: 9px;
    color: #6cb6ff;
}

/* ---- toolbar ------------------------------------------------------- */

.app-toolbar {
    flex: 0 0 auto;
    background: #404040;
    border-bottom: 1px solid #1c1c1c;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 32px;
    padding: 0 6px;
}

.toolbar__sep {
    width: 1px;
    height: 60%;
    background: #5a5a5a;
    margin: 0 4px;
}

.toolbar__btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #e6e6e6;
    padding: 3px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.toolbar__btn:hover {
    background: #555;
    border-color: #6b6b6b;
}

.toolbar__btn:active {
    background: #2f2f2f;
}

.toolbar__btn:disabled {
    opacity: 0.55;
    cursor: progress;
}

.toolbar__glyph {
    font-size: 13px;
    line-height: 1;
}

/* ---- main / layout ------------------------------------------------- */

#app {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.app-layout {
    display: flex;
    height: 100%;
    width: 100%;
    background: #494949;
}

.app-panel {
    display: flex;
    flex-direction: column;
    background: #494949;
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
}

.app-panel--editor {
    flex: 1 1 auto;
    background: #424242;
    border-left: 1px solid #1c1c1c;
    border-right: 1px solid #1c1c1c;
}

.app-splitter {
    flex: 0 0 5px;
    cursor: col-resize;
    background: #2d2d2d;
}

.app-splitter:hover,
body.is-splitter-dragging .app-splitter {
    background: #1f6db3;
}

body.is-splitter-dragging {
    cursor: col-resize;
    user-select: none;
}

/* ---- panel chrome -------------------------------------------------- */

.panel-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 6px;
    gap: 6px;
}

.panel-section {
    flex: 0 0 auto;
    background: #3f3f3f;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
}

.panel-section--grow {
    flex: 1 1 auto;
    min-height: 0;
}

.panel-section__title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b3b3b3;
}

/* ---- files info --------------------------------------------------- */

.files-info__list {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    font-size: 12px;
    margin: 0;
}

.files-info__list dt {
    color: #9a9a9a;
}

.files-info__list dd {
    margin: 0;
    color: #e6e6e6;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---- controls ----------------------------------------------------- */

.control {
    background: #2c2c2c;
    color: #e6e6e6;
    border: 1px solid #1c1c1c;
    border-radius: 3px;
    padding: 3px 6px;
    font: inherit;
    width: 100%;
}

.control--numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.control:disabled {
    color: #777;
    background: #353535;
}

.numeric-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.numeric-stepper__label {
    font-size: 11px;
    color: #9a9a9a;
    flex: 0 0 auto;
}

.category-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.icon-button {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    background: #555;
    border: 1px solid #6b6b6b;
    border-radius: 3px;
    color: #e6e6e6;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.icon-button:hover {
    background: #6b6b6b;
}

.button-row {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---- preview canvas ----------------------------------------------- */

.preview-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    justify-content: center;
}

.preview-canvas canvas {
    background: #2a2a2a;
    border: 1px solid #1c1c1c;
    image-rendering: pixelated;
}

.tdv {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tdv__canvas-wrap {
    background: #2a2a2a;
    border: 1px solid #1c1c1c;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tdv__canvas {
    image-rendering: pixelated;
    width: 96px;
    height: 96px;
    display: block;
}

.tdv__hint {
    margin: 0;
    font-size: 10px;
    color: #888;
    text-align: center;
    word-break: break-word;
}

.preview-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
}

.preview-controls__row {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.preview-controls__row--range {
    justify-content: stretch;
}

.preview-controls__row--range .preview-range {
    flex: 1 1 auto;
}

.preview-control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-control-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: #b3b3b3;
}

.preview-control-count {
    color: #e0e0e0;
    font-variant-numeric: tabular-nums;
}

.preview-direction-pad {
    display: grid;
    grid-template-columns: repeat(3, 22px);
    grid-template-rows: repeat(3, 22px);
    gap: 3px;
    justify-content: center;
}

.preview-direction-pad__center {
    width: 22px;
    height: 22px;
}

.preview-direction-btn.is-active {
    background: #1f6db3;
    border-color: #5fa3dd;
    color: #fff;
}

.preview-direction-btn.is-direction-hidden {
    visibility: hidden;
}

.preview-pose-btn {
    width: auto;
    padding: 0 10px;
    height: 22px;
    flex: 1;
}

.preview-pose-btn.is-active {
    background: #1f6db3;
    border-color: #5fa3dd;
    color: #fff;
}

.preview-range {
    width: 100%;
    min-width: 0;
    accent-color: #1f6db3;
}

.preview-controls__patterns label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: #b3b3b3;
}

.preview-controls__patterns input {
    width: 38px;
    padding: 1px 4px;
}

.sprite-grid__cell--has-canvas {
    position: relative;
    background: #2a2a2a;
    overflow: hidden;
}

.sprite-grid__canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    display: block;
}

.sprite-grid__id {
    position: absolute;
    left: 1px;
    bottom: 0;
    font-size: 9px;
    color: #fff;
    text-shadow: 0 0 2px #000, 0 0 2px #000;
    pointer-events: none;
}

.preview-canvas__hint {
    font-size: 11px;
    color: #888;
    margin: 0;
    text-align: center;
}

/* ---- thing list --------------------------------------------------- */

.thing-list {
    flex: 1 1 auto;
    overflow-y: auto;
    background: #2c2c2c;
    border: 1px solid #1c1c1c;
    border-radius: 3px;
    min-height: 0;
}

.thing-list__item {
    padding: 5px 10px;
    cursor: pointer;
    border-bottom: 1px solid #232323;
    color: #d0d0d0;
    font-size: 12px;
}

.thing-list__item:hover {
    background: #3f3f3f;
}

.thing-list__item.is-selected {
    background: #1f6db3;
    color: #fff;
}

/* ---- virtual list ------------------------------------------------ */

.vlist {
    flex: 1 1 auto;
    overflow-y: auto;
    background: #2c2c2c;
    border: 1px solid #1c1c1c;
    border-radius: 3px;
    min-height: 0;
    outline: none;
    position: relative;
}

.vlist:focus {
    border-color: #1f6db3;
}

.vlist__spacer {
    position: relative;
    width: 100%;
}

.vlist__rows {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vlist__row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    border-bottom: 1px solid #232323;
    color: #d0d0d0;
    font-size: 12px;
    cursor: pointer;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
}

.thing-row-thumb {
    width: 33px;
    height: 33px;
    flex: 0 0 33px;
    display: grid;
    place-items: center;
    background: #636363;
    box-shadow: inset 0 0 0 1px #272727;
}

.thing-row-thumb--empty::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1px solid #7a7a7a;
    opacity: 0.35;
}

.thing-row-thumb__canvas {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.vlist__row-id {
    flex: 0 0 auto;
}

.vlist__row-meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #a8a8a8;
}

.vlist__row:hover {
    background: #3f3f3f;
}

.vlist__row.is-selected {
    background: #1f6db3;
    color: #fff;
}

.vlist__row.is-selected .vlist__row-meta {
    color: #fff;
}

/* ---- sprite grid -------------------------------------------------- */

.sprite-grid {
    flex: 1 1 auto;
    overflow-y: auto;
    background: #2c2c2c;
    border: 1px solid #1c1c1c;
    border-radius: 3px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 3px;
    align-content: start;
    min-height: 0;
}

.sprite-grid__cell {
    aspect-ratio: 1 / 1;
    background: #404040;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #8a8a8a;
    cursor: pointer;
}

.sprite-grid__cell:hover {
    background: #4f4f4f;
    color: #e6e6e6;
}

.sprite-grid__cell--slot {
    background: #2c2c2c;
}

/* ---- editor ------------------------------------------------------- */

.editor-panel {
    padding: 0;
}

.editor-tabs {
    flex: 0 0 auto;
    display: flex;
    background: #3a3a3a;
    border-bottom: 1px solid #1c1c1c;
}

.editor-tabs__tab {
    background: transparent;
    border: 0;
    color: #b3b3b3;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 12px;
    border-right: 1px solid #2c2c2c;
}

.editor-tabs__tab:hover {
    color: #fff;
}

.editor-tabs__tab.is-active {
    background: #424242;
    color: #fff;
    border-bottom: 2px solid #1f6db3;
}

.editor-tab-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 12px 16px;
    min-height: 0;
}

.editor-tab-body[hidden] {
    display: none;
}

.editor-actions {
    flex: 0 0 auto;
    border-top: 1px solid #1c1c1c;
    background: #353535;
    padding: 6px 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

.editor-status {
    flex: 1 1 auto;
    color: #9a9a9a;
    font-size: 11px;
}

.editor-status.is-dirty {
    color: #ffd070;
}

.button {
    background: #555;
    color: #e6e6e6;
    border: 1px solid #6b6b6b;
    border-radius: 3px;
    padding: 4px 14px;
    cursor: pointer;
    font: inherit;
}

.button:hover {
    background: #6b6b6b;
}

.button:disabled {
    color: #888;
    background: #3f3f3f;
    border-color: #4a4a4a;
    cursor: not-allowed;
}

/* ---- forms inside editor ----------------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 12px;
}

.form-grid--two-col {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}

.form-field--inline {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.open-detected {
    background: rgba(31, 109, 179, 0.12);
    border: 1px solid #2a4f72;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
}

.open-detected__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.open-detected__list strong {
    color: #5fa3dd;
    margin-right: 6px;
}

.form-field__label {
    color: #b3b3b3;
    font-size: 11px;
}

.form-section {
    margin-top: 14px;
}

.form-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b3b3b3;
    margin-bottom: 6px;
}

.sprite-slot-grid {
    background: #2c2c2c;
    border: 1px solid #1c1c1c;
    border-radius: 3px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 3px;
}

/* ---- modal --------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-card {
    background: #3a3a3a;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
    min-width: 380px;
    max-width: 540px;
    color: #e6e6e6;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-card:has(.menu-window) {
    max-width: min(92vw, 820px);
}

.modal-card__header {
    padding: 10px 14px;
    background: #2d2d2d;
    font-weight: 600;
    border-bottom: 1px solid #1c1c1c;
}

.modal-card__body {
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-card__body label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
    color: #d8d8d8;
}

.modal-card__body label.inline {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.menu-window {
    min-width: min(72vw, 760px);
}

.menu-window--about {
    min-width: 360px;
}

.menu-window--about h3 {
    font-size: 15px;
}

.menu-window--about p {
    margin: 0;
    color: #d8d8d8;
}

.menu-window__summary {
    color: #b8b8b8;
    font-size: 12px;
}

.menu-window__table-wrap {
    max-height: 420px;
    overflow: auto;
    border: 1px solid #1c1c1c;
    background: #2f2f2f;
}

.menu-window__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    white-space: nowrap;
}

.menu-window__table th,
.menu-window__table td {
    padding: 5px 8px;
    border-bottom: 1px solid #242424;
    text-align: left;
    vertical-align: top;
}

.menu-window__table th {
    position: sticky;
    top: 0;
    background: #262626;
    color: #f0f0f0;
    z-index: 1;
}

.menu-window__table tr.is-active td {
    background: #244c70;
}

.menu-window__empty {
    color: #9a9a9a;
    text-align: center;
}

/* ---- look type generator ----------------------------------------- */

.modal-card:has(.look-generator) {
    max-width: min(92vw, 740px);
}

.look-generator {
    min-width: min(80vw, 680px);
    display: grid;
    grid-template-columns: minmax(250px, 1fr) minmax(300px, 1.15fr);
    gap: 10px;
}

.look-generator__panel {
    background: #303030;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
    padding: 8px;
}

.look-generator__panel:last-child {
    grid-column: 1 / -1;
}

.look-generator__checkbox {
    align-self: end;
    min-height: 24px;
}

.look-generator__part-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.look-generator__part-tab {
    flex: 1 1 0;
    padding-inline: 6px;
}

.look-generator__part-tab.is-active {
    background: #1f6db3;
    border-color: #2f84d1;
    color: #fff;
}

.look-generator__palette {
    display: grid;
    grid-template-columns: repeat(19, 16px);
    gap: 2px;
    justify-content: start;
}

.look-generator__swatch {
    width: 16px;
    height: 16px;
    border: 1px solid #111;
    border-radius: 2px;
    padding: 0;
    cursor: pointer;
}

.look-generator__swatch:hover,
.look-generator__swatch.is-selected {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

.look-generator__xml {
    min-height: 74px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre;
}

.look-generator__actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.look-generator__status {
    color: #b8b8b8;
    font-size: 12px;
}

/* ---- object viewer ------------------------------------------------ */

.modal-card:has(.object-viewer) {
    max-width: min(94vw, 920px);
}

.object-viewer {
    width: min(86vw, 860px);
    min-height: min(72vh, 560px);
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 10px;
}

.object-viewer__sidebar,
.object-viewer__main {
    min-height: 0;
    background: #303030;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
    padding: 8px;
}

.object-viewer__sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.object-viewer__files {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.object-viewer__file {
    width: 100%;
    border: 1px solid #1f1f1f;
    background: #383838;
    color: #e6e6e6;
    border-radius: 3px;
    padding: 6px 8px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.object-viewer__file:hover,
.object-viewer__file.is-active {
    background: #1f6db3;
    border-color: #2f84d1;
    color: #fff;
}

.object-viewer__file.has-error {
    border-color: #8f3d3d;
}

.object-viewer__file small {
    color: #b8b8b8;
}

.object-viewer__empty,
.object-viewer__status {
    color: #b8b8b8;
    font-size: 12px;
}

.object-viewer__main {
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto auto;
    gap: 8px;
}

.object-viewer__toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.object-viewer__toolbar .button {
    padding-inline: 9px;
}

.object-viewer__background-toggle {
    margin-left: auto;
}

.object-viewer__color {
    width: 34px;
    height: 24px;
    padding: 0;
    border: 1px solid #1c1c1c;
    background: #2c2c2c;
}

.object-viewer__zoom {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #b8b8b8;
    font-size: 12px;
}

.object-viewer__preview {
    --object-viewer-bg: transparent;
    min-height: 220px;
    display: grid;
    place-items: center;
    overflow: auto;
    background: #252525;
    border: 1px solid #1c1c1c;
}

.object-viewer__preview .tdv__canvas-wrap {
    background: var(--object-viewer-bg);
}

.object-viewer__info {
    display: grid;
    grid-template-columns: repeat(3, auto 1fr);
    gap: 3px 8px;
    margin: 0;
    font-size: 12px;
}

.object-viewer__info dt {
    color: #9a9a9a;
}

.object-viewer__info dd {
    margin: 0;
    color: #e6e6e6;
    font-variant-numeric: tabular-nums;
}

/* ---- animation editor -------------------------------------------- */

.modal-card:has(.animation-editor) {
    max-width: min(94vw, 880px);
}

.animation-editor {
    width: min(86vw, 820px);
    min-height: min(72vh, 540px);
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 10px;
}

.animation-editor__preview-panel,
.animation-editor__settings {
    min-height: 0;
    background: #303030;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
    padding: 8px;
}

.animation-editor__preview-panel {
    display: grid;
    grid-template-rows: minmax(220px, 1fr) auto;
    gap: 8px;
}

.animation-editor__preview {
    display: grid;
    place-items: center;
    overflow: auto;
    background: #252525;
    border: 1px solid #1c1c1c;
}

.animation-editor__transport,
.animation-editor__actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.animation-editor__transport .button,
.animation-editor__actions .button {
    padding-inline: 9px;
}

.animation-editor__settings {
    display: grid;
    grid-template-rows: auto minmax(180px, 1fr) auto;
    gap: 10px;
}

.animation-editor__checkbox {
    align-self: end;
    min-height: 24px;
}

.animation-editor__frames-wrap {
    min-height: 0;
    overflow: auto;
    border: 1px solid #1c1c1c;
    background: #2f2f2f;
}

.animation-editor__frames {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.animation-editor__frames th,
.animation-editor__frames td {
    padding: 5px 6px;
    border-bottom: 1px solid #242424;
    text-align: left;
}

.animation-editor__frames th {
    position: sticky;
    top: 0;
    background: #262626;
    z-index: 1;
}

.animation-editor__frames input {
    min-width: 70px;
}

.animation-editor__frame-jump {
    width: 100%;
    padding-inline: 8px;
}

.animation-editor__status {
    color: #b8b8b8;
    font-size: 12px;
}

/* ---- sprites optimizer ------------------------------------------- */

.modal-card:has(.sprites-optimizer) {
    max-width: min(90vw, 460px);
}

.sprites-optimizer {
    width: min(76vw, 400px);
    display: grid;
    gap: 10px;
}

.sprites-optimizer__options,
.sprites-optimizer__result {
    background: #303030;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
    padding: 8px;
}

.sprites-optimizer__options {
    display: grid;
    gap: 6px;
}

.sprites-optimizer__stats {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 5px 12px;
    margin: 0;
    font-size: 12px;
}

.sprites-optimizer__stats dt {
    color: #9a9a9a;
}

.sprites-optimizer__stats dd {
    margin: 0;
    color: #e6e6e6;
    font-variant-numeric: tabular-nums;
}

.sprites-optimizer__status {
    margin-top: 8px;
    color: #b8b8b8;
    font-size: 12px;
}

.sprites-optimizer__actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

@media (max-width: 760px) {
    .look-generator {
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .look-generator__panel:last-child {
        grid-column: auto;
    }

    .look-generator__palette {
        grid-template-columns: repeat(auto-fit, 16px);
    }

    .object-viewer {
        width: min(86vw, 520px);
        grid-template-columns: 1fr;
    }

    .object-viewer__info {
        grid-template-columns: auto 1fr;
    }

    .animation-editor {
        width: min(86vw, 520px);
        grid-template-columns: 1fr;
    }

    .sprites-optimizer {
        width: min(82vw, 400px);
    }
}

.modal-card__footer {
    padding: 8px 14px;
    background: #353535;
    border-top: 1px solid #1c1c1c;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.button--primary {
    background: #1f6db3;
    border-color: #2980d2;
}

.button--primary:hover {
    background: #2980d2;
}

/* ---- status bar --------------------------------------------------- */

.app-status {
    flex: 0 0 auto;
    background: #2d2d2d;
    border-top: 1px solid #1c1c1c;
    padding: 3px 12px;
    font-size: 11px;
    color: #9a9a9a;
    min-height: 20px;
}
