.page-tool--php-array-json-converter .tool-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-tool--php-array-json-converter .tool-controls__body {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.page-tool--php-array-json-converter .tool-direction {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    gap: 3px;
}

.page-tool--php-array-json-converter .tool-direction__option {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.page-tool--php-array-json-converter .tool-direction__option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.page-tool--php-array-json-converter .tool-direction__label {
    display: inline-block;
    padding: 7px 14px;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease;
}

.page-tool--php-array-json-converter .tool-direction__option input:checked + .tool-direction__label {
    background: var(--accent);
    color: var(--accent-fg);
}

.page-tool--php-array-json-converter .tool-direction__option input:focus-visible + .tool-direction__label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.page-tool--php-array-json-converter .tool-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.page-tool--php-array-json-converter .field--inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-tool--php-array-json-converter .field--inline[hidden] {
    display: none;
}

.page-tool--php-array-json-converter .field--inline .field__label {
    font-size: 0.82rem;
    color: var(--muted);
}

.page-tool--php-array-json-converter .field--inline .select {
    min-width: 9rem;
}

.page-tool--php-array-json-converter .tool-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.page-tool--php-array-json-converter .tool-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-tool--php-array-json-converter .tool-pane__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.page-tool--php-array-json-converter .panel__head-actions {
    display: flex;
    gap: 8px;
}

.page-tool--php-array-json-converter .tool-textarea {
    display: block;
    flex: 1 1 auto;
    min-height: 27rem;
    padding: 14px 16px;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.55;
    tab-size: 4;
}

.page-tool--php-array-json-converter .tool-textarea:focus {
    box-shadow: none;
}

.page-tool--php-array-json-converter .tool-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.page-tool--php-array-json-converter .tool-hint code,
.page-tool--php-array-json-converter .tool-about__text code {
    padding: 0.05rem 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    background: var(--surface-3);
    color: var(--ink-2);
    font-family: var(--font-mono);
}

.page-tool--php-array-json-converter .tool-hint--note {
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.page-tool--php-array-json-converter .tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
}

.page-tool--php-array-json-converter .tool-status {
    min-height: 0;
    margin: 0;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--muted);
}

.page-tool--php-array-json-converter .tool-status.status {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}

.page-tool--php-array-json-converter .tool-status.status--error {
    background: var(--danger-soft);
    color: var(--danger);
}

.page-tool--php-array-json-converter .tool-status.status--success {
    background: var(--success-soft);
    color: var(--success);
}

.page-tool--php-array-json-converter .tool-error {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--danger-soft);
    color: var(--danger);
}

.page-tool--php-array-json-converter .tool-error__message {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.page-tool--php-array-json-converter .tool-error__snippet {
    margin: 0;
    padding: 10px 12px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.45;
    white-space: pre;
}

.page-tool--php-array-json-converter .tool-output__empty {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.page-tool--php-array-json-converter .tool-output__empty[hidden] {
    display: none;
}

.page-tool--php-array-json-converter .tool-output {
    flex: 1 1 auto;
    min-height: 27rem;
    margin: 0;
    padding: 14px 16px;
    overflow: auto;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: pre;
    tab-size: 4;
}

.page-tool--php-array-json-converter .tool-output[hidden] {
    display: none;
}

.page-tool--php-array-json-converter .tool-output__warning {
    margin: 0;
    padding: 11px 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.page-tool--php-array-json-converter .tool-about__text {
    max-width: 80ch;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .page-tool--php-array-json-converter .tool-workspace {
        grid-template-columns: 1fr;
    }

    .page-tool--php-array-json-converter .tool-textarea {
        min-height: 18rem;
    }

    .page-tool--php-array-json-converter .tool-output {
        min-height: 20rem;
    }
}

@media (max-width: 560px) {
    .page-tool--php-array-json-converter .tool-controls__body {
        align-items: stretch;
    }

    .page-tool--php-array-json-converter .tool-direction {
        width: 100%;
    }

    .page-tool--php-array-json-converter .tool-direction__option {
        flex: 1 1 0;
        justify-content: center;
    }

    .page-tool--php-array-json-converter .tool-direction__label {
        padding: 8px 6px;
        text-align: center;
        white-space: normal;
    }
}
