.dps-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}
.dps-cols-1 { grid-template-columns: 1fr; }
.dps-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dps-cols-3 { grid-template-columns: repeat(3, 1fr); }
.dps-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .dps-cols-3, .dps-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .dps-cols-2, .dps-cols-3, .dps-cols-4 { grid-template-columns: 1fr; }
}

.dps-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.dps-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.dps-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f3f4f6 center/cover no-repeat;
    position: relative;
}
.dps-card-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #047857, #065f46);
}
.dps-card-thumb-empty .dps-file-badge {
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 22px;
}

.dps-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.dps-card-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0;
}
.dps-card-title a {
    color: #111827;
    text-decoration: none;
}
.dps-card-title a:hover { text-decoration: underline; }

.dps-card-excerpt {
    color: #4b5563;
    font-size: 14px;
    margin: 0;
}

.dps-card-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: #6b7280;
    align-items: center;
}
.dps-card-meta li { margin: 0; }
.dps-card-count strong { color: #111827; }

.dps-pill {
    display: inline-block;
    padding: 2px 8px;
    background: #ecfdf5;
    color: #065f46;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dps-button {
    margin-top: auto;
    display: inline-block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    transition: background .15s ease, transform .1s ease;
}
.dps-button:active { transform: scale(0.98); }

.dps-button-free {
    background: #2563eb;
    color: #fff !important;
}
.dps-button-free:hover { background: #1d4ed8; }

.dps-button-buy {
    background: #16a34a;
    color: #fff !important;
}
.dps-button-buy:hover { background: #15803d; }

.dps-button-paid {
    background: #047857;
    color: #fff !important;
}
.dps-button-paid:hover { background: #065f46; }

.dps-button-alt {
    background: #f3f4f6;
    color: #111827 !important;
}
.dps-button-alt:hover { background: #e5e7eb; }

.dps-empty {
    padding: 40px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}

/* Pay panel */
.dps-pay-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    animation: dps-fade-in .2s ease;
}
.dps-pay-panel[hidden] { display: none; }

@keyframes dps-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dps-pay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #065f46;
    font-size: 15px;
}
.dps-amount {
    font-weight: 700;
    background: #047857;
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.dps-pay-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
.dps-pay-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    font-size: 14px;
}
.dps-pay-label {
    color: #065f46;
    font-weight: 600;
    min-width: 130px;
}
.dps-pay-value {
    flex: 1;
    color: #111827;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}
.dps-copy {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s ease;
}
.dps-copy:hover { background: #d1fae5; }
.dps-copy.dps-copied { background: #047857; color: #fff; border-color: #047857; }

.dps-pay-instructions {
    font-size: 13px;
    color: #064e3b;
    background: #ecfdf5;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.dps-pay-instructions p { margin: 0 0 6px; }
.dps-pay-instructions p:last-child { margin: 0; }

.dps-pay-warning {
    background: #fef3c7;
    color: #78350f;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin: 0 0 10px;
}

.dps-pay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dps-pay-actions .dps-button {
    margin-top: 0;
    flex: 1;
    min-width: 160px;
}
