.media-card,
.collection-card {
    position: relative;
}

.quick-save-button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: #fff;
    background: rgba(12, 15, 21, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
    touch-action: manipulation;
}

.quick-save-button:hover,
.quick-save-button:focus-visible {
    background: rgba(19, 23, 31, 0.92);
    border-color: rgba(255, 255, 255, 0.48);
    transform: translateY(-1px) scale(1.03);
}

.quick-save-button:active {
    transform: scale(0.94);
}

.quick-save-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.quick-save-button svg {
    width: 23px;
    height: 23px;
    overflow: visible;
}

.quick-save-button path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 150ms ease, transform 150ms ease;
    transform-origin: center;
}

.quick-save-button.is-saved {
    color: #ff4166;
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.85);
}

.quick-save-button.is-saved path {
    fill: currentColor;
    transform: scale(1.04);
}

.quick-save-button.is-busy svg {
    animation: quick-save-pulse 700ms ease-in-out infinite alternate;
}

.detail-quick-save {
    gap: .5rem;
    white-space: nowrap;
}

.detail-quick-save svg {
    width: 1.05rem;
    height: 1.05rem;
    overflow: visible;
}

.detail-quick-save path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: fill 150ms ease, transform 150ms ease;
    transform-origin: center;
}

.detail-quick-save.is-saved {
    color: var(--accent, #ff4166);
    border-color: color-mix(in srgb, var(--accent, #ff4166) 42%, transparent);
    background: color-mix(in srgb, var(--accent, #ff4166) 12%, transparent);
}

.detail-quick-save.is-saved path {
    fill: currentColor;
    transform: scale(1.04);
}

.detail-quick-save.is-busy svg {
    animation: quick-save-pulse 700ms ease-in-out infinite alternate;
}

@keyframes quick-save-pulse {
    from { transform: scale(0.88); opacity: 0.58; }
    to { transform: scale(1.04); opacity: 1; }
}

@media (max-width: 640px) {
    .quick-save-button {
        top: 9px;
        right: 9px;
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .quick-save-button svg {
        width: 22px;
        height: 22px;
    }

    .detail-quick-save,
    .detail-correction-action {
        flex: 1 1 calc(50% - .4rem);
        justify-content: center;
    }
}