.generator-form {
    margin-top: 14px;
}

.field-group {
    margin: 0;
}

.field-group--topic {
    margin-bottom: 12px;
}

.field-group--topic input,
.field-group--grade select {
    width: 100%;
}

.field-group--grade {
    width: 150px;
    flex: 0 0 150px;
}

.label-row {
    margin-bottom: 6px;
}

label {
    font-size: 13px;
    font-weight: 700;
}

select,
.feedback-textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
    font: inherit;
    outline: none;
    transition: 0.18s ease;
}

select {
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.feedback-textarea::placeholder {
    color: #9aa7ba;
}

select:focus,
.feedback-textarea:focus {
    border-color: rgba(79, 70, 229, 0.34);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #64748b 50%),
        linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position:
        calc(100% - 22px) calc(50% - 3px),
        calc(100% - 16px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.composer-card--compact {
    display: grid;
    gap: 18px;
}

.composer-card--top {
    align-self: start;
}

.composer-head--simple {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.form-bottom-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
}

.form-actions {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-download,
.ghost-btn,
.feedback-submit,
.file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    font-weight: 700;
}

.btn-primary {
    min-height: 48px;
    padding: 0 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.22);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-secondary,
.ghost-btn {
    min-height: 44px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--text-main);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.btn-secondary:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
    background: #fff;
}

.download-buttons {
    margin-top: 12px;
    display: none;
    gap: 10px;
}

.download-buttons.visible {
    display: flex;
}

.btn-download {
    min-height: 46px;
    padding: 0 14px;
    background: linear-gradient(135deg, #0f766e 0%, var(--success) 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.18);
}

.download-buttons.visible .btn-download {
    width: 100%;
}