* {
    box-sizing: border-box;
}

:root {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #111827;
    background: #f3f4f6;
}

body {
    margin: 0;
    background: #f3f4f6;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.app-header {
    padding: 22px 18px;
    background: #111827;
    color: white;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: white;
    color: #111827;

    font-weight: 800;
}

h1 {
    margin: 0;
    font-size: 1.35rem;
}

.app-header p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

main {
    padding: 16px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.05);
}

.card h2 {
    margin: 0 0 18px;
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    font-size: 0.85rem;
    font-weight: 600;
}

.field label span {
    color: #dc2626;
}

input,
select,
textarea {
    width: 100%;

    padding: 13px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: white;
    color: #111827;

    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #374151;
    box-shadow:
        0 0 0 3px rgba(55, 65, 81, 0.08);
}

textarea {
    resize: vertical;
}

.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
    margin-bottom: 22px;
}

.mode-button {
    padding: 14px;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    background: white;

    cursor: pointer;

    font-weight: 600;
}

.mode-button.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

.mode-icon {
    margin-right: 4px;
}

.mode-panel.hidden {
    display: none;
}

.recorder {
    text-align: center;
    padding: 14px 0;
}

.microphone {
    font-size: 3rem;
    margin-bottom: 8px;
}

.recording-status {
    color: #6b7280;
    font-size: 0.85rem;
}

.timer {
    margin: 8px 0 20px;

    font-size: 2rem;
    font-weight: 700;

    letter-spacing: 2px;
}

.btn {
    border: none;
    border-radius: 12px;

    padding: 14px 18px;

    cursor: pointer;

    font-weight: 700;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-record {
    width: 100%;
    background: #dc2626;
    color: white;
}

.recorder-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
    margin-top: 12px;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.separator {
    display: flex;
    align-items: center;

    margin: 22px 0;

    color: #9ca3af;
}

.separator::before,
.separator::after {
    content: "";
    flex: 1;

    height: 1px;
    background: #e5e7eb;
}

.separator span {
    padding: 0 12px;
}

.upload-box {
    display: block;

    padding: 24px;

    border: 2px dashed #d1d5db;
    border-radius: 14px;

    text-align: center;

    cursor: pointer;

    background: #f9fafb;
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 7px;
}

.upload-box strong {
    display: block;
}

.upload-box small {
    display: block;

    margin-top: 5px;

    color: #6b7280;
}

.process-section {
    margin-top: 20px;
}

.btn-process {
    width: 100%;

    padding: 17px;

    background: #111827;
    color: white;

    font-size: 1rem;
}

.process-note {
    text-align: center;

    color: #6b7280;

    font-size: 0.75rem;
}

footer {
    text-align: center;

    padding: 20px;

    color: #9ca3af;

    font-size: 0.75rem;
}

@media (min-width: 700px) {

    .app-header {
        border-radius: 0 0 18px 18px;
    }

    main {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .btn-record {
        width: auto;
        min-width: 280px;
    }

    .recorder-actions {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 12px;
    }
}
