#account-name {
    color: #a1f4d8;
    font-size: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@font-face {
    font-family: Editor;
    src: local("Segoe UI");
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #10181c;
    color: #c6d3d9;
    font:
        12px Editor,
        system-ui,
        sans-serif;
    overflow: hidden;
}
button,
input,
select,
textarea {
    font: inherit;
}
button {
    background: #24323a;
    color: #d6e1e5;
    border: 1px solid #34444d;
    border-radius: 4px;
    padding: 7px 10px;
    cursor: pointer;
    white-space: nowrap;
}
button:hover {
    background: #354952;
    border-color: #65838d;
}
button.active,
button.primary {
    background: #22483f;
    border-color: #4eab92;
    color: #a1f4d8;
}
button:disabled {
    opacity: 0.35;
    cursor: default;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #65ecd0;
    outline-offset: 1px;
}
input,
select,
textarea {
    background: #131f25;
    border: 1px solid #34454d;
    color: #d9e5eb;
    border-radius: 4px;
    padding: 7px;
    min-width: 0;
}
input[type="checkbox"] {
    accent-color: #6de0bf;
}
textarea {
    width: 100%;
    min-height: 200px;
    font:
        12px Consolas,
        monospace;
    line-height: 1.5;
    resize: vertical;
}
header {
    height: 58px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 24px;
    border-bottom: 1px solid #314047;
    background: #172228;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1.8px;
    font-size: 10px;
}
.brand strong {
    font-size: 16px;
    color: #eaf7f5;
    letter-spacing: 3px;
}
.brand sup {
    color: #a1f4d8;
    font-size: 9px;
    letter-spacing: 0;
    margin-left: -5px;
}
.mark {
    background: #70e4c0;
    color: #142b26;
    font-size: 21px;
    font-weight: 900;
    padding: 4px 9px;
    transform: skew(-8deg);
}
.divider {
    height: 20px;
    border-left: 1px solid #3d5057;
    margin: 0 4px;
}
#map-title {
    color: #e2edee;
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#file-actions {
    display: flex;
    gap: 7px;
}
nav {
    height: 46px;
    display: flex;
    gap: 5px;
    padding: 7px 12px;
    border-bottom: 1px solid #304149;
    background: #1a272e;
    align-items: center;
}
nav .separator {
    height: 24px;
    border-left: 1px solid #3a4a52;
    margin: 0 4px;
}
nav label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #849da8;
}
nav input {
    width: 54px;
    padding: 5px;
}
main {
    height: calc(100vh - 136px);
    display: grid;
    grid-template-columns: 252px 1fr 308px;
}
aside {
    background: #19252c;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#left {
    border-right: 1px solid #34464e;
}
#right {
    border-left: 1px solid #34464e;
}
.tabs {
    display: flex;
    background: #172229;
    border-bottom: 1px solid #33454d;
    padding: 8px;
    gap: 5px;
}
.tabs button {
    flex: 1;
    background: none;
    border-color: transparent;
}
.tabs button.active {
    background: #263940;
    border-color: #35534f;
    color: #8cedce;
}
#objects-panel,
#assets-panel {
    padding: 10px;
    min-height: 0;
    overflow: auto;
    flex: 1;
}
#objects-panel[hidden],
#assets-panel[hidden] {
    display: none;
}
input[type="search"] {
    width: 100%;
    margin-bottom: 10px;
}
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 0 10px;
}
.row button {
    padding: 5px 7px;
    font-size: 11px;
}
#object-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.object {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    border-color: transparent;
    background: transparent;
    padding: 8px;
}
.object .dot {
    width: 7px;
    height: 7px;
    background: #76a4a8;
    flex-shrink: 0;
    border-radius: 2px;
}
.object.selected {
    background: #25443d;
    color: #a2f0d6;
    border-color: #3f7565;
}
.object small {
    margin-left: auto;
    color: #74909b;
    max-width: 64px;
    overflow: hidden;
}
.object span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.muted {
    color: #87a0ac;
    line-height: 1.7;
}
.count {
    padding: 8px;
    color: #849ba5;
}
#asset-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}
.asset {
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: #142127;
    padding: 6px;
    overflow: hidden;
}
.asset img {
    height: 54px;
    width: 80px;
    object-fit: contain;
    background: #0d171b;
}
.asset span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
}
#viewport {
    position: relative;
    background: #11242c;
    min-width: 0;
    overflow: hidden;
    outline: none;
}
#viewport canvas {
    display: block;
    touch-action: none;
}
#viewport-caption {
    position: absolute;
    top: 15px;
    left: 18px;
    z-index: 2;
    display: flex;
    gap: 14px;
    pointer-events: none;
    align-items: center;
    color: #cee3e4;
    text-shadow: 0 1px 5px #000;
}
#tool-name {
    font-size: 10px;
    letter-spacing: 2px;
    background: #16272edc;
    padding: 6px 10px;
    border: 1px solid #49736e;
    border-radius: 3px;
}
#viewport-help {
    font-size: 11px;
    opacity: 0.8;
}
#view-actions {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    gap: 5px;
}
#view-actions button {
    background: #17282ddd;
    backdrop-filter: blur(8px);
}
#loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #8cd7c3;
    pointer-events: none;
}
#loading[hidden] {
    display: none;
}
#inspector {
    padding: 12px;
    overflow: auto;
    flex: 1;
}
.section-title {
    color: #e1eded;
    font-weight: 600;
    margin: 4px 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.empty {
    padding: 30px 8px;
    line-height: 1.9;
    color: #8fa7b1;
}
.empty strong {
    display: block;
    color: #d4e8e7;
    font-size: 16px;
    margin-bottom: 8px;
}
details {
    border-top: 1px solid #32434b;
    padding-top: 10px;
    margin: 12px 0;
}
summary {
    cursor: pointer;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
    color: #a7c4c8;
    padding-bottom: 8px;
}
.field {
    display: grid;
    grid-template-columns: minmax(82px, 1fr) minmax(0, 1.15fr) 20px;
    align-items: center;
    gap: 6px;
    margin: 5px 0;
}
.field label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #a8bbc3;
}
.field button {
    padding: 2px;
    border: 0;
    background: none;
    color: #69858e;
}
.field input,
.field select {
    width: 100%;
}
.subtree {
    padding-left: 8px;
    border-left: 1px solid #344a52;
}
.subtree details {
    border-top: 0;
    margin: 8px 0;
    padding: 0;
}
.subtree summary {
    text-transform: none;
    letter-spacing: 0;
}
.note {
    font-size: 11px;
    line-height: 1.6;
    color: #8da7b0;
    padding: 8px 0;
}
footer {
    height: 32px;
    background: #142027;
    border-top: 1px solid #34464e;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 14px;
    color: #8ba7b1;
    font-size: 11px;
}
#status {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
footer button {
    padding: 3px 8px;
    border: 0;
    background: none;
    color: #c2d9d6;
}
dialog {
    color: #cfdee1;
    background: #1b2a32;
    border: 1px solid #46616a;
    border-radius: 9px;
    box-shadow: 0 30px 100px #0009;
    width: 680px;
    max-width: 90vw;
    max-height: 85vh;
    padding: 22px;
}
dialog::backdrop {
    background: #041015b8;
    backdrop-filter: blur(3px);
}
dialog form {
    margin: 0;
}
.dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.dialog-heading h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    color: #e0efed;
}
.dialog-heading button {
    background: none;
    border: 0;
    font-size: 22px;
    padding: 0 6px;
}
#dialog-body {
    overflow: auto;
    max-height: 60vh;
}
#dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
}
.map-row {
    display: flex;
    text-align: left;
    width: 100%;
    margin: 4px 0;
    gap: 14px;
    align-items: center;
}
.map-row span {
    flex: 1;
}
.map-row small {
    color: #93adb7;
}
.issue {
    display: block;
    width: 100%;
    white-space: normal;
    text-align: left;
    margin: 5px 0;
    color: #edc594;
}
a {
    color: #83e7cd;
}
.instructions {
    white-space: pre-line;
    line-height: 1.7;
}
#toolbar button {
    font-size: 11px;
    padding: 6px 8px;
}
@media (max-width: 1150px) {
    main {
        grid-template-columns: 210px 1fr 270px;
    }
    .brand > span:last-child {
        display: none;
    }
    header {
        gap: 14px;
        padding: 0 12px;
    }
    #viewport-help {
        display: none;
    }
    nav {
        overflow-x: auto;
    }
}
@media (max-width: 850px) {
    main {
        grid-template-columns: 170px 1fr 240px;
    }
    .brand strong {
        display: none;
    }
    #file-actions {
        gap: 3px;
    }
    #file-actions button {
        padding: 6px;
    }
    #map-title {
        font-size: 11px;
    }
}

#toolbar {
    overflow-x: auto;
    flex-shrink: 0;
}
#toolbar > * {
    flex-shrink: 0;
}
.attribute-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    flex-shrink: 0;
    margin-right: 5px;
    color: #84dec7;
}
.viewport-filters {
    padding: 8px 0;
    border-bottom: 1px solid #34464e;
    margin-bottom: 8px;
}
.viewport-filters label {
    display: block;
    margin: 6px 0;
}
.viewport-filters input[type="number"] {
    width: 64px;
    margin-left: 8px;
}
.viewport-filters input[type="range"] {
    width: 100%;
    padding: 0;
    accent-color: #65ecd0;
}
.viewport-filters button {
    padding: 4px 8px;
    margin-right: 5px;
}
#view-actions {
    flex-wrap: wrap;
    right: 12px;
}
#toolbar input[type="color"] {
    padding: 2px;
    width: 32px;
    height: 28px;
}
.brush-settings {
    flex-shrink: 0;
    max-height: 40vh;
    overflow: auto;
    padding: 10px;
    margin: 0;
    border-top: 1px solid #34464e;
}
.brush-settings label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 5px 0;
}
.brush-settings input,
.brush-settings select {
    width: 115px;
}
.brush-settings input[type="color"] {
    height: 32px;
    padding: 2px;
}
.brush-settings input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}
.brush-settings input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 2px;
}
.brush-settings output {
    display: block;
    text-align: right;
    color: #83e7cd;
}
.brush-settings[hidden],
.brush-settings [hidden],
#toolbar [hidden] {
    display: none;
}
.field input[type="color"] {
    height: 32px;
    padding: 2px;
}
.field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}
.field input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 2px;
}
.texture-field {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.texture-field select {
    flex: 1;
    min-width: 0;
}
.texture-preview {
    width: 36px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    background: #0d171b;
    border: 1px solid #34454d;
    border-radius: 3px;
}
.field .texture-sample {
    padding: 0;
    flex-shrink: 0;
}
.texture-sample canvas {
    display: block;
    cursor: pointer;
}
.asset.active {
    background: #25443d;
    border-color: #4eab92;
}
.physics-panel {
    position: absolute;
    top: 52px;
    right: 12px;
    z-index: 3;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 95%;
    padding: 6px;
    background: #17282ddd;
    border-radius: 5px;
}
.physics-panel button,
.physics-panel select {
    font-size: 11px;
    padding: 6px;
}
.save-world-field {
    display: block;
    margin: 9px 0 0;
    color: #c6d3d9;
}
.save-world-field input,
.save-world-field select {
    display: block;
    width: 100%;
    margin-top: 4px;
}
.manual-panel {
    position: fixed;
    z-index: 12;
    top: 116px;
    right: 22px;
    width: min(760px, calc(100vw - 44px));
    height: min(720px, calc(100vh - 150px));
    min-width: 320px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    resize: both;
    border: 1px solid #4a656e;
    border-radius: 8px;
    background: #10181c;
    box-shadow: 0 24px 80px #000b;
}
.manual-panel[hidden] {
    display: none;
}
.manual-panel-heading {
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px 0 13px;
    border-bottom: 1px solid #354a52;
    background: #1b2a32;
    cursor: move;
    user-select: none;
    touch-action: none;
}
.manual-panel-heading strong {
    color: #dcebea;
    font-size: 12px;
    letter-spacing: 0.04em;
}
.manual-panel-heading div {
    display: flex;
    gap: 3px;
}
.manual-panel-heading button {
    width: 30px;
    height: 30px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    font-size: 18px;
}
.manual-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #10181c;
}
.manual-panel.minimized {
    height: 42px !important;
    min-height: 42px;
    resize: none;
}
.manual-panel.minimized iframe {
    display: none;
}
@media (max-width: 600px) {
    .manual-panel {
        top: 104px;
        right: 10px;
        width: calc(100vw - 20px);
        min-width: 0;
        height: calc(100vh - 144px);
    }
}
