* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.app {
    width: min(1100px, 94%);
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 0 20px;
}

header > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #111827;
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 19px;
}

h1 {
    margin: 0;
    font-size: 24px;
}

header p {
    margin: 3px 0 0;
    color: #6b7280;
}

.version {
    color: #6b7280;
    font-size: 13px;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 3px 18px rgba(0,0,0,.06);
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
}

textarea {
    width: 100%;
    min-height: 360px;
    resize: vertical;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 15px;
    font: inherit;
    line-height: 1.55;
    outline: none;
}

textarea:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(17,24,39,.08);
}

.counter {
    text-align: right;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 6px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 15px;
}

button {
    border: 0;
    border-radius: 10px;
    padding: 11px 15px;
    font-weight: 650;
    cursor: pointer;
    background: #e5e7eb;
}

button.primary {
    background: #111827;
    color: white;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

button.small {
    padding: 7px 11px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    min-height: 22px;
    margin-bottom: 9px;
    color: #6b7280;
    font-size: 13px;
}

footer {
    padding: 20px 0 30px;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}

@media (max-width: 760px) {

    .app {
        width: 94%;
    }

    header {
        padding-top: 18px;
    }

    header p {
        display: none;
    }

    main {
        grid-template-columns: 1fr;
    }

    textarea {
        min-height: 230px;
    }

    .actions button {
        flex: 1;
    }
}

.tool-options {
    margin-top: 16px;
    padding: 15px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.tool-options label {
    margin-bottom: 7px;
    font-size: 13px;
}

.tool-options select {
    width: 100%;
    padding: 11px 12px;
    margin-bottom: 11px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: white;
    color: #111827;
    font: inherit;
    outline: none;
}

.tool-options select:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(17,24,39,.08);
}

.tool-options button {
    width: 100%;
}

/* ===== v0.3.0 ===== */

.result-actions {
    display: flex;
    gap: 7px;
}

#inputText,
#resultText {
    overflow-y: hidden;
}

@media (max-width: 760px) {

    #inputText,
    #resultText {
        min-height: 180px;
    }

    .card {
        padding: 16px;
        border-radius: 15px;
    }

    .result-actions {
        gap: 5px;
    }

    .result-actions button {
        padding: 7px 9px;
        font-size: 12px;
    }
}
