.mqrs,
.mqrs * {
    box-sizing: border-box;
}

.mqrs {
    width: 100%;
    max-width: 720px;
    margin: 24px auto;
    padding: clamp(16px, 4vw, 28px);
    color: #172033;
    background: #fff;
    border: 1px solid #dce2ea;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgb(15 23 42 / 6%);
    font-family: inherit;
    line-height: 1.6;
}

.mqrs [hidden] {
    display: none !important;
}

.mqrs h2 {
    margin: 0 0 10px;
    color: #172033;
    font-size: clamp(24px, 5vw, 30px);
    line-height: 1.25;
}

.mqrs-intro {
    margin: 0 0 20px;
}

.mqrs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mqrs button {
    appearance: none;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    color: #fff;
    background: #175cd3;
    border: 1px solid #175cd3;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
    cursor: pointer;
}

.mqrs button:hover:not(:disabled) {
    color: #fff;
    background: #124aa8;
    border-color: #124aa8;
}

.mqrs button.mqrs-secondary {
    color: #172033;
    background: #f3f5f8;
    border-color: #cbd3df;
}

.mqrs button.mqrs-secondary:hover:not(:disabled) {
    color: #172033;
    background: #e7ecf3;
    border-color: #aab7c8;
}

.mqrs button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mqrs button:focus-visible,
.mqrs textarea:focus-visible {
    outline: 3px solid #175cd3;
    outline-offset: 3px;
}

.mqrs-help,
.mqrs-privacy {
    color: #536174;
    font-size: 13px;
}

.mqrs-help {
    margin: 12px 0;
}

.mqrs-reader-wrap {
    margin: 18px 0;
    overflow: hidden;
    background: #f3f5f8;
    border: 1px solid #dce2ea;
    border-radius: 12px;
}

.mqrs-reader {
    width: 100%;
    min-height: 120px;
}

.mqrs-reader video,
.mqrs-reader img,
.mqrs-reader canvas {
    max-width: 100%;
}

.mqrs-status {
    margin: 16px 0;
    padding: 12px 14px;
    color: #17446f;
    background: #edf5ff;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.mqrs-status.mqrs-error,
.mqrs-noscript {
    color: #991b1b;
    background: #fff0f0;
}

.mqrs-result {
    margin-top: 20px;
}

.mqrs-result label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.mqrs-result textarea {
    display: block;
    width: 100%;
    min-height: 150px;
    margin: 0 0 12px;
    padding: 12px;
    color: #172033;
    background: #f8fafc;
    border: 1px solid #cbd3df;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
}

.mqrs-privacy {
    margin: 20px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e5eaf0;
}

@media (max-width: 480px) {
    .mqrs-actions {
        flex-direction: column;
    }

    .mqrs-actions button {
        width: 100%;
    }
}