.result-panel.has-media {
    grid-template-columns: 230px 1fr;
    align-items: stretch;
}

.media-preview {
    min-height: 230px;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255,255,255,.055);
    border: 1px solid var(--border);
}

.media-preview img {
    width: 100%;
    height: 100%;
    min-height: 230px;
    display: block;
    object-fit: cover;
}

.media-placeholder {
    width: 100%;
    height: 100%;
    min-height: 230px;
    display: grid;
    place-items: center;
    font-size: 38px;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, rgba(109, 93, 251, .95), rgba(34, 211, 238, .7));
}

.result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

.meta-grid span {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.04);
}

.meta-grid strong {
    color: var(--text);
}

.result-help {
    color: var(--muted);
    margin: 4px 0 14px;
}

.download-list,
.format-grid {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255,255,255,.045);
}

.download-item-thumb {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.download-item-info strong {
    display: block;
    color: var(--text);
    font-weight: 850;
}

.download-item-info small,
.download-item-info em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
    word-break: break-word;
}

.download-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.download-link,
.format-button {
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    box-shadow: 0 16px 40px rgba(109, 93, 251, .24);
}

.download-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease;
}

.download-link:hover,
.format-button:hover,
.mini-button:hover {
    transform: translateY(-1px);
}

.format-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 0 16px;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    transition: transform .2s ease, opacity .2s ease;
}

.format-button span {
    font-weight: 900;
}

.format-button small {
    color: rgba(255,255,255,.78);
    font-weight: 750;
}

.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 14px;
    color: #E4E4E7;
    background: rgba(255,255,255,.065);
    border: 1px solid var(--border);
    font-weight: 750;
    cursor: pointer;
    transition: transform .2s ease;
}

.error-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: white;
    background: rgba(239, 68, 68, .16);
    border: 1px solid rgba(239, 68, 68, .28);
    font-size: 32px;
    font-weight: 900;
}

.badge-danger {
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, .28);
    background: rgba(239, 68, 68, .10);
}

.error-box {
    padding: 14px 16px;
    border-radius: 16px;
    color: #FCA5A5;
    border: 1px solid rgba(239, 68, 68, .28);
    background: rgba(239, 68, 68, .10);
}

.legal-page {
    width: min(100%, 920px);
    margin: 0 auto;
    padding: 40px 0 100px;
}

.legal-page h1 {
    margin: 14px 0 24px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: .95;
    letter-spacing: -.06em;
}

.legal-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--card);
    color: var(--muted);
    line-height: 1.8;
}

.legal-card h2 {
    margin: 28px 0 8px;
    color: var(--text);
    font-size: 24px;
    letter-spacing: -.03em;
}

@media (max-width: 760px) {
    .result-panel.has-media {
        grid-template-columns: 1fr;
    }

    .media-preview,
    .media-preview img,
    .media-placeholder {
        min-height: 260px;
    }

    .format-grid {
        grid-template-columns: 1fr;
    }

    .download-item {
        grid-template-columns: 1fr;
    }

    .download-item-thumb {
        width: 100%;
        height: 180px;
    }

    .download-item-actions {
        justify-content: stretch;
    }

    .download-link,
    .mini-button {
        flex: 1;
    }
}