.tool-form.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 8px 24px 16px;
    overflow: hidden;
}

.tool-form.fullscreen .tool-title {
    order: 0;
    flex-shrink: 0;
}

.tool-form.fullscreen .tool-header-split {
    order: 0;
    flex-shrink: 0;
}

.tool-form.fullscreen .tool-top-toolbar,
.tool-form.fullscreen .editor-toolbar {
    order: 0;
    flex-shrink: 0;
}

.tool-form.fullscreen .json-editor-panel-output .json-output-toolbar {
    flex-shrink: 0;
}

.tool-form.fullscreen .form-btn {
    order: 1;
    flex-shrink: 0;
    justify-content: center;
}

.tool-form.fullscreen .form-field {
    order: 2;
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.tool-form.fullscreen .tool-result {
    order: 3;
    flex-shrink: 0;
}

.tool-form.fullscreen #container {
    flex: 1;
    height: auto !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.tool-form.fullscreen #container.json-editor-split {
    flex-direction: row;
    width: 100%;
}

.tool-form.fullscreen .json-editor-split {
    height: 100%;
    min-height: 0;
}

.tool-form.fullscreen .json-editor-panel-input,
.tool-form.fullscreen .json-editor-panel-output {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.tool-form.fullscreen #input-editor-host {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tool-form.fullscreen #input-editor-host .ln-textarea,
.tool-form.fullscreen #input-editor-host .cm-editor {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
}

.tool-form.fullscreen .json-editor-panel {
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    flex: 1 1 0;
}

.tool-form.fullscreen .json-editor-panel .wd-editor,
.tool-form.fullscreen .json-editor-panel .output-panel {
    flex: 1;
    height: 100% !important;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.tool-form.fullscreen .wd-editor {
    height: 100% !important;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
}

.tool-form.fullscreen .right .ace_gutter-layer {
    height: 100% !important;
}

@media screen and (max-width: 768px) {
    .tool-form.fullscreen {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .tool-form.fullscreen .json-editor-split {
        flex-direction: column;
        gap: 6px;
        height: 100% !important;
        min-height: 0 !important;
    }

    .tool-form.fullscreen .json-editor-panel {
        flex: 1 1 0;
        min-height: 0 !important;
        height: auto !important;
        width: 100%;
    }

    .tool-form.fullscreen .json-editor-panel-input,
    .tool-form.fullscreen .json-editor-panel-output {
        max-height: none;
    }

    .tool-form.fullscreen .json-output-toolbar {
        flex-wrap: wrap;
        gap: 4px;
    }
}
