.hero.is-dark {
    background:
            linear-gradient(135deg, #2f2f2f, #454545 58%, #37554f);
}

#json-tool-subtitle {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.08rem;
    line-height: 1.55;
}

#json-tool-shell {
    border: 2px solid #2f2f2f;
    border-radius: 8px;
    background: var(--card-bg);
    box-shadow: 8px 8px 0 rgba(47, 47, 47, 0.08);
    padding: 1.25rem;
}

#json-tool-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

#json-tool-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.75rem;
}

#json-tool-options .field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0;
}

#json-tool-options .label {
    margin-bottom: 0;
    white-space: nowrap;
}

#json_indent {
    min-width: 8.75rem;
    border-width: 2px;
    border-color: #c9d8d3;
    border-radius: 8px;
    background: #fbfffd;
}

#json_indent:focus {
    border-color: #2f2f2f;
    box-shadow: 0 0 0 0.2rem rgba(55, 85, 79, 0.16);
}

#json-sort-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.5rem;
    padding: 0.5rem 0.72rem;
    border: 2px solid #2f2f2f;
    border-radius: 8px;
    background: #ffffff;
    color: #2f2f2f;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#json-sort-label:hover {
    background: #f7fbfa;
    transform: translateY(-1px);
}

#json-sort-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#json-sort-label input:focus-visible + .json-checkbox-mark {
    box-shadow: 0 0 0 0.2rem rgba(55, 85, 79, 0.16);
}

.json-checkbox-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    border: 2px solid #2f2f2f;
    border-radius: 6px;
    background: #fbfffd;
    color: #ffffff;
    line-height: 1;
}

.json-checkbox-mark::before {
    content: "";
    width: 0.62rem;
    height: 0.38rem;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    opacity: 0;
    transform: translateY(-1px) rotate(-45deg);
}

#json-sort-label input:checked + .json-checkbox-mark {
    background: #2f2f2f;
}

#json-sort-label input:checked + .json-checkbox-mark::before {
    opacity: 1;
}

.json-checkbox-text {
    line-height: 1.2;
}

#json-tool-actions {
    justify-content: flex-start;
    margin-bottom: 0;
    gap: 0.55rem;
}

#json-tool-actions .button,
#json_copy_btn {
    border-radius: 8px;
    font-weight: 800;
}

#json-tool-actions .button {
    min-height: 2.65rem;
}

#json-tool-actions .button.is-light {
    border: 2px solid #2f2f2f;
    background: #ffffff;
}

#json-tool-status {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #d9e6e2;
    border-radius: 8px;
    background: #f7fbfa;
    color: #42534f;
    line-height: 1.45;
}

#json-tool-status.is-success {
    border-color: #bcdccb;
    background: #f1fbf5;
    color: #1f6b40;
}

#json-tool-status.is-danger {
    border-color: #e6c7c7;
    background: #fff5f5;
    color: #a33232;
}

#json-tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.json-tool-panel {
    min-width: 0;
}

.json-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.35rem;
    margin-bottom: 0.45rem;
}

.json-panel-header .label,
#json-output-title {
    margin: 0;
    color: #2f2f2f;
    font-size: 0.96rem;
    font-weight: 850;
    line-height: 1.25;
}

.json-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    height: 1.9rem;
    padding: 0 0.55rem;
    border: 1px solid #d9e6e2;
    border-radius: 8px;
    background: #ffffff;
    color: #4b5b57;
    font-size: 0.82rem;
    font-weight: 800;
}

.json-editor,
.json-output {
    width: 100%;
    box-sizing: border-box;
    height: 430px;
    min-height: 430px;
    border: 2px solid #c9d8d3;
    border-radius: 8px;
    background: #fbfffd;
    color: #252525;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.95rem;
    line-height: 1.55;
    tab-size: 4;
}

.json-editor {
    max-height: none;
    resize: vertical;
    box-shadow: none;
}

.json-editor:focus {
    border-color: #2f2f2f;
    box-shadow: 0 0 0 0.2rem rgba(55, 85, 79, 0.16);
}

.json-output {
    margin: 0;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.95rem;
}

#json-output-actions {
    justify-content: flex-start;
    margin-bottom: 0;
}

#json-output-actions .button {
    width: 100%;
}

#json-tool-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

#json-tool-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid #d9e6e2;
    border-radius: 8px;
    background: #ffffff;
    color: #445551;
    font-size: 0.86rem;
    line-height: 1.25;
}

#json-tool-stats b {
    color: #243632;
}

@media screen and (max-width: 920px) {
    #json-tool-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    #json-tool-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    #json-tool-actions,
    #json-tool-options {
        justify-content: flex-start;
    }
}

@media screen and (max-width: 640px) {
    #json-tool-shell {
        padding: 1rem;
        box-shadow: 5px 5px 0 rgba(47, 47, 47, 0.08);
    }

    #json-tool-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    #json-tool-actions .button,
    #json_copy_btn {
        width: 100%;
    }

    #json-tool-options {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    #json-tool-options .field {
        display: block;
    }

    #json-tool-options .label {
        margin-bottom: 0.35rem;
    }

    #json_indent,
    #json-tool-options .select {
        width: 100%;
    }

    .json-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .json-editor,
    .json-output {
        height: 320px;
        min-height: 320px;
    }
}
