.qr-tool-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 1.25rem;
    align-items: start;
    margin-top: 1.5rem;
}

.qr-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
}

.qr-panel h2 {
    margin-top: 0;
    font-size: 1.25rem;
    text-align: left;
}

.qr-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.qr-form-grid .span-2 {
    grid-column: 1 / -1;
}

.qr-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.qr-field label {
    font-weight: 700;
}

.qr-field input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
    padding: 0.65rem 0.7rem;
}

.qr-field input:focus {
    outline: 2px solid var(--focus-outline-color);
    outline-offset: 2px;
}

.qr-dropzone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7rem, 9rem);
    align-items: center;
    gap: 1rem;
    min-height: 11rem;
    padding: 1.25rem;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.qr-dropzone:hover,
.qr-dropzone:focus,
.qr-dropzone.is-dragging {
    border-color: var(--accent-color);
    outline: none;
}

.qr-dropzone.is-dragging {
    background: var(--bg-tertiary, var(--bg-secondary));
}

.qr-file-input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.qr-drop-copy {
    display: grid;
    gap: 0.35rem;
}

.qr-drop-copy strong {
    font-size: 1.15rem;
}

.qr-drop-copy span {
    color: var(--date-color);
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.qr-button {
    border: 0;
    border-radius: 4px;
    background: var(--accent-color);
    color: #ffffff;
    cursor: pointer;
    font-weight: 700;
    min-height: 2.7rem;
    padding: 0.65rem 1rem;
}

.qr-button.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

.qr-preview-area {
    display: grid;
    gap: 1rem;
}

.qr-art-preview,
.qr-output-preview {
    display: grid;
    place-items: center;
    min-height: 18rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    overflow: hidden;
}

.qr-art-preview img,
.qr-output-preview img {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-art-preview img {
    max-height: 8rem;
    border-radius: 6px;
}

.qr-output-preview img {
    width: min(100%, 585px);
}

.qr-status {
    min-height: 1.5rem;
    color: var(--date-color);
    font-weight: 600;
}

.qr-status.error {
    color: #c1121f;
}

@media (max-width: 900px) {
    .qr-tool-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .qr-form-grid {
        grid-template-columns: 1fr;
    }

    .qr-form-grid .span-2 {
        grid-column: auto;
    }

    .qr-dropzone {
        grid-template-columns: 1fr;
    }
}
