main {
    display: grid;
    grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
    gap: 1rem;
    height: 100vh;
    padding: 1rem;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.output-header h3 {
    margin: 0;
}

#sync-form {
    border: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.field {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.field label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.field input,
.field select {
    font-size: 1.15rem;
    padding: 0.4rem;
    width: 100%;
}

#tables {
    background: transparent;
    border: none;
    flex: 1;
    font-size: 1.35rem;
    height: 100%;
    line-height: 1.45;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

#tables option {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.375rem;
    color: #1f2937;
    cursor: pointer;
    font-weight: 700;
    margin-bottom: 0.4rem;
    padding: 0.65rem 0.8rem;
}

#tables option:hover,
#tables option:checked {
    background: #0d6efd;
    color: white;
}

#output {
    min-width: 0;
    min-height: 0;
    height: 25%;
    white-space: pre-wrap;
    background: #111827;
    color: white;
    padding: 1rem;
    overflow: auto;
}

@media only screen and (max-width: 960px) {
main {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    #output {
        min-height: 16rem;
    }

    #tables {
        min-height: 18rem;
    }
}
