.content-area.single-post.aifonts-single.materials-single {
    background-color: #f5f6fa;
}

.materials-image-section:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 4px;
    border-radius: 10px;
}

.materials-gallery-image[hidden] {
    display: none !important;
}

.materials-gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
    object-fit: contain;
    will-change: transform, opacity;
}

.materials-gallery-image.is-entering-from-left {
    animation: materials-gallery-enter-left .42s cubic-bezier(.4, 0, .2, 1);
}

.materials-gallery-image.is-entering-from-right {
    animation: materials-gallery-enter-right .42s cubic-bezier(.4, 0, .2, 1);
}

.materials-gallery-image.is-leaving-to-left {
    animation: materials-gallery-leave-left .42s cubic-bezier(.4, 0, .2, 1);
}

.materials-gallery-image.is-leaving-to-right {
    animation: materials-gallery-leave-right .42s cubic-bezier(.4, 0, .2, 1);
}

@keyframes materials-gallery-enter-left {
    from {
        opacity: .25;
        transform: translateX(-105%);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes materials-gallery-enter-right {
    from {
        opacity: .25;
        transform: translateX(105%);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes materials-gallery-leave-left {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: .15;
        transform: translateX(-105%);
    }
}

@keyframes materials-gallery-leave-right {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: .15;
        transform: translateX(105%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .materials-gallery-image.is-entering-from-left,
    .materials-gallery-image.is-entering-from-right,
    .materials-gallery-image.is-leaving-to-left,
    .materials-gallery-image.is-leaving-to-right {
        animation: none;
    }
}

.materials-gallery-navigation {
    left: 18px;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: row;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.materials-image-section:hover .materials-gallery-navigation,
.materials-image-section:focus-within .materials-gallery-navigation {
    opacity: 1;
    visibility: visible;
}

.materials-gallery-navigation .nav-button {
    border: 0;
    pointer-events: auto;
    cursor: pointer;
}

.materials-gallery-empty {
    color: #8c8f94;
    font-size: 16px;
}

.materials-gallery-counter {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .66);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
}

.materials-single .aifonts-main-content-inner {
    height: auto;
    min-height: 82vh;
}

.materials-single .info-section {
    position: relative;
    min-height: 0;
}

.materials-action-buttons .action-button {
    flex-basis: calc((100% - 15px) / 2);
    aspect-ratio: 5 / 2;
    padding: 8px;
}

.materials-single .prompt-section {
    flex: 0 0 auto;
}

.materials-single .prompt-section-inner {
    min-height: 0;
    max-height: 200px;
    overflow-y: auto;
    padding: 16px 24px 18px;
}

.materials-single .prompt-section-inner:empty {
    display: none;
}

.materials-single .prompt-section-guide {
    margin-top: 12px;
    margin-bottom: 20px;
}

.materials-disclaimer {
    margin-top: 16px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.6;
    color: #888;
    background: #f9f9f9;
    border-radius: 6px;
}

.materials-disclaimer i {
    margin-right: 6px;
    color: #bbb;
}

.materials-action-buttons .materials-download-btn {
    background: #18a957;
    color: #fff;
}

.materials-action-buttons .materials-download-btn:hover {
    background: #128743;
    color: #fff;
}

.materials-action-buttons .action-button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.materials-download-group-switcher {
    margin-bottom: 18px;
}

.materials-single .prompt-section-inner h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.materials-single .prompt-content p:first-child {
    margin-top: 0;
}

.materials-single .prompt-content p:last-child {
    margin-bottom: 0;
}

.materials-guide-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}

.materials-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.materials-title-row .post-title {
    flex: 1;
    min-width: 0;
}

.materials-title-row .materials-commercial-badge {
    margin-top: 2px;
}

.materials-edit-link {
    position: absolute;
    top: -16px;
    right: -12px;
    color: #999;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.materials-edit-link:hover {
    color: #2271b1;
}

.materials-commercial-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 5px 10px;
    border: 1px solid #a7d7b4;
    border-radius: 999px;
    background: #edf8f0;
    color: #18783a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.materials-guide-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: #78808a;
    font-size: 12px;
    line-height: 1.5;
}

.materials-guide-tags__label {
    white-space: nowrap;
}

.materials-guide-tags__item {
    color: #66707a;
    text-decoration: none;
}

.materials-guide-tags__item + .materials-guide-tags__item::before {
    content: '·';
    margin-right: 6px;
    color: #a0a6ad;
}

.materials-guide-tags__item:hover {
    color: #18a957;
}

.materials-post .post-image {
    position: relative;
}

.materials-card-likes {
    position: absolute;
    top: 10px;
    z-index: 2;
    pointer-events: none;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.materials-card-likes i {
    color: #ff7285;
}

.materials-post .post-stats .materials-card-badge {
    gap: 6px;
    min-height: 30px;
    padding: 6px 9px;
    border: 1px solid rgba(24, 169, 87, .16);
    border-radius: 6px;
    background: linear-gradient(135deg, #f0fcf5, #e7f8ef);
    color: #16864a;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    white-space: nowrap;
}

.materials-post .post-stats .materials-card-badge i {
    color: #18a957;
    font-size: 13px;
}

.materials-card-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 4px 4px 0;
    background: #fff;
}

.materials-card-thumbnail {
    display: block;
    min-width: 0;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 3px;
    background: #f0f0f1;
}

.materials-card-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.materials-card-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 16px;
    border: 1px solid #dcdcde;
    border-radius: 5px;
    background: #fff;
    color: #50575e;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.materials-card-download i {
    font-size: 13px;
}

.materials-card-download:hover,
.materials-card-download:focus {
    border-color: #a7aaad;
    background: #f6f7f7;
    color: #1d2327;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .1);
    transform: translateY(-1px);
}

.materials-card-download:focus-visible {
    outline: 2px solid rgba(80, 87, 94, .25);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .materials-action-buttons {
        flex-direction: row;
    }

    .materials-action-buttons .action-button {
        min-width: 0;
    }

    .materials-gallery-navigation .nav-button {
        width: 42px;
        height: 42px;
    }

    .materials-guide-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 992px) {
    .materials-main-content .aifonts-main-content-inner {
        width: calc(100% - 30px);
        height: auto;
        min-height: 82vh;
        flex-direction: column;
        padding: 15px;
    }

    .materials-main-content .image-section {
        width: 100%;
        min-height: 50vh;
    }

    .materials-main-content .info-section {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .materials-main-content {
        padding: 10px;
    }

    .materials-main-content .aifonts-main-content-inner {
        width: 100%;
        min-height: 0;
        padding: 10px;
    }

    .materials-main-content .image-section {
        min-height: 50vh;
    }

    .materials-main-content .info-section {
        padding: 15px 5px;
    }

    .materials-main-content .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .materials-main-content .materials-download-btn,
    .materials-main-content .favorite-btn {
        width: 100%;
        min-height: 52px;
        flex: none;
    }
}

/* 详情页最终覆盖：统一字号、对齐和图片容器背景。 */
.materials-single .materials-main-content .image-container {
    background: transparent;
}

.materials-single .materials-main-content .prompt-content {
    font-size: 14px;
    line-height: 1.75;
}

.materials-single .materials-title-row {
    align-items: center;
}

.materials-single .materials-title-row .post-title {
    font-size: 28px;
    line-height: 1.3;
}

.materials-single .materials-title-row .materials-commercial-badge {
    margin-top: 0;
}

.materials-single .materials-main-content #favorite-btn,
.materials-single .materials-main-content #favorite-btn .favorite-text {
    font-size: 16px;
}

.materials-single .materials-main-content #favorite-btn i {
    font-size: 18px;
}

/* 按 zishuai 素材详情页统一为两列大按钮。 */
.materials-single .materials-action-buttons .action-button {
    display: flex;
    flex: 0 0 calc((100% - 15px) / 2);
    min-width: 80px;
    min-height: 0;
    aspect-ratio: 5 / 2;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 0;
    border-radius: 12px;
    background: #f5f6fa;
    color: #333;
    font-size: 1rem;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.materials-single .materials-action-buttons .action-button i {
    display: block;
    color: inherit;
    font-size: 20px;
}

.materials-single .materials-action-buttons .action-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
    background: #000;
    color: #fff;
}

.materials-single .materials-action-buttons .materials-download-btn {
    background: #DE6156;
    color: #fff;
}

.materials-single .materials-action-buttons .materials-download-btn:hover {
    background: #c95147;
    color: #fff;
}

.materials-single .materials-action-buttons .materials-download-btn.is-disabled,
.materials-single .materials-action-buttons .materials-download-btn.is-disabled:hover {
    background: #f5f6fa;
    color: #777;
    cursor: default;
    opacity: .82;
    transform: none;
    box-shadow: none;
}

.materials-single .materials-action-buttons #favorite-btn[data-liked="1"] {
    background: #f5f6fa;
    color: #333;
}

.materials-single .materials-action-buttons #favorite-btn[data-liked="1"] .favorite-text,
.materials-single .materials-action-buttons #favorite-btn[data-liked="1"] i {
    color: #999;
}

@media (max-width: 768px) {
    .materials-single .materials-action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .materials-single .materials-action-buttons .action-button {
        width: 100%;
        flex: none;
        aspect-ratio: auto;
        min-height: 52px;
    }
}

.materials-single {
    background: #f5f6fa;
}

.materials-main-content {
    padding: 30px 0;
}

.materials-main-content .aifonts-main-content-inner {
    position: relative;
    display: flex;
    width: 80%;
    max-width: 1600px;
    height: 82vh;
    gap: 30px;
    margin: 0 auto;
    padding: 25px;
    border-radius: 14px;
    background: #fff;
}

.materials-main-content .image-section {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.materials-main-content .image-container {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background: #f7f8fa;
}

.materials-main-content .aifonts-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.materials-main-content .info-section {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
}

.materials-main-content .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
    font-size: .9rem;
}

.materials-main-content .post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.materials-main-content .prompt-section {
    flex: 1;
}

.materials-main-content .prompt-section-inner {
    box-sizing: border-box;
    min-height: 180px;
    height: 240px;
    padding: 20px 20px 30px;
    border-radius: 10px;
    background: #f5f6fa;
}

.materials-main-content .prompt-content {
    min-height: 0;
    overflow-y: auto;
    color: #444;
    font-size: .9rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.materials-main-content .action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
}

.materials-main-content .action-button {
    display: flex;
    min-width: 120px;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 0;
    border-radius: 30px;
    background: #007cba;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.materials-main-content .materials-download-btn {
    flex: 0 0 calc((100% - 30px) / 3);
    min-width: 80px;
    min-height: 74px;
    box-sizing: border-box;
    border-radius: 12px;
    background: #f5f6fa;
    color: #333;
    text-decoration: none;
}

.materials-main-content .materials-download-btn:hover {
    background: #000;
    color: #fff;
}

.materials-main-content .materials-download-btn.is-disabled {
    cursor: default;
    opacity: .7;
}

.materials-main-content .materials-download-btn.is-disabled:hover {
    background: #f5f6fa;
    color: #333;
}

.image-viewer-modal {
    display: flex;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 64px 48px;
    background: rgba(0, 0, 0, .88);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
}

.image-viewer-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .3s ease;
}

.image-viewer-content {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(.95);
    transition: opacity .3s ease, transform .3s ease;
}

.image-viewer-modal.is-open .image-viewer-content {
    opacity: 1;
    transform: none;
}

.image-viewer-close {
    position: absolute;
    top: 18px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, .28);
}

body.image-viewer-open {
    overflow: hidden;
}

.materials-main-content .materials-gallery-image {
    cursor: zoom-in;
}

@media (max-width: 768px) {
    .image-viewer-modal {
        padding: 56px 14px 20px;
    }

    .image-viewer-close {
        top: 10px;
        right: 12px;
        width: 38px;
        height: 38px;
    }
}
.materials-single-page .header {
    min-height: 0 !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

.materials-single-page .breadcrumbs {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 12px;
    padding-bottom: 12px;
}

.materials-single .materials-title-row .post-title {
    margin: 0;
    color: #333;
    font-size: 32px;
    line-height: 1.3;
    word-break: break-word;
}

.materials-single .prompt-section-inner h3 {
    font-size: 18px;
}

.materials-single .prompt-content {
    font-size: 15px;
    line-height: 1.8;
}

.materials-single .materials-download-btn {
    font-size: 15px;
}

.materials-image-details {
    padding: 0;
    margin-bottom: 24px;
}

.materials-image-details h3 {
    margin: 0 0 24px;
    color: #333;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
}

.materials-image-details dl {
    margin: 0;
}

.materials-image-details dl > div {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    font-size: 20px;
    line-height: 1.5;
}

.materials-image-details dt {
    flex-shrink: 0;
    color: #666;
    font-weight: 400;
}

.materials-image-details dd {
    margin: 0;
    color: #999;
    overflow-wrap: anywhere;
}

@media (min-width: 993px) {
    .materials-main-content .image-section {
        flex: 0 0 calc(60% - 18px);
        box-sizing: border-box;
    }

    .materials-main-content .info-section {
        flex: 0 0 calc(40% - 12px);
        box-sizing: border-box;
    }
}

.materials-single .materials-preview-badge {
    position: absolute;
    top: 16px;
    left: 26px;
    right: auto;
    z-index: 5;
    width: 36px;
    height: auto;
    pointer-events: none;
}

.materials-single .materials-main-content .info-section {
    gap: 24px;
    padding: 12px 8px 8px 4px;
}

.materials-single .materials-title-row .post-title {
    color: #252c34;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -.5px;
}

.materials-single .info-section .post-meta {
    margin: -12px 0 0;
    font-size: 13px;
}

.materials-single .info-section .prompt-section {
    flex: 0 0 auto;
}

.materials-single .materials-image-details {
    margin: 0;
    padding: 22px;
    border: 1px solid #e9edf0;
    border-radius: 14px;
    background: #f8fafb;
}

.materials-single .materials-image-details h3 {
    margin: 0 0 18px;
    color: #39434d;
    font-size: 15px;
    font-weight: 600;
}

.materials-single .materials-image-details dl > div {
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid #e9edf0;
    font-size: 15px;
}

.materials-single .materials-image-details dl > div:first-child {
    padding-top: 0;
}

.materials-single .materials-image-details dl > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.materials-single .materials-image-details dt {
    color: #7b8590;
    font-size: 13px;
}

.materials-single .materials-image-details dd {
    color: #39434d;
    font-weight: 500;
    text-align: right;
}

.materials-single .info-section .prompt-section-guide {
    margin: 22px 0 0;
}

.materials-single .materials-guide-tags {
    gap: 8px;
}

.materials-single .materials-guide-tags__label {
    flex-basis: 100%;
    margin-bottom: 4px;
    color: #7b8590;
    font-size: 13px;
}

.materials-single .materials-guide-tags__item {
    padding: 6px 10px;
    border: 1px solid #e9edf0;
    border-radius: 6px;
    background: #fff;
    color: #65717c;
    font-size: 12px;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.materials-single .materials-guide-tags__item + .materials-guide-tags__item::before {
    content: none;
}

.materials-single .materials-guide-tags__item:hover {
    border-color: #cde5d5;
    background: #f3faf5;
    color: #267547;
}

.materials-single .materials-action-buttons {
    gap: 12px;
}

.materials-single .materials-action-buttons .action-button {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: row;
    aspect-ratio: auto;
    min-height: 80px;
    gap: 9px;
    padding: 14px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.materials-single .materials-action-buttons .action-button:hover {
    transform: translateY(-2px);
}

.materials-single .materials-action-buttons .action-button i {
    font-size: 17px;
}

.materials-single .materials-action-buttons .favorite-text {
    white-space: nowrap;
}

.materials-single .materials-title-row .materials-collect-btn {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #929ba4;
    font-size: 22px;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.materials-single .materials-title-row .materials-collect-btn:hover,
.materials-single .materials-title-row .materials-collect-btn[data-collected="1"] {
    background: #fff4e5;
    color: #b77922;
}

.materials-single .materials-title-row .materials-collect-btn:focus-visible {
    outline: 2px solid #DE6156;
    outline-offset: 2px;
}

.materials-single .materials-title-row .materials-collect-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.materials-single .materials-action-buttons button:disabled {
    opacity: .65;
    cursor: wait;
}

.materials-single .materials-main-content #favorite-btn,
.materials-single .materials-main-content #favorite-btn .favorite-text {
    font-size: 14px;
}

.materials-single .materials-disclaimer {
    margin: -8px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #949ca4;
    font-size: 12px;
    line-height: 1.8;
}

@media (max-width: 992px) {
    .materials-single .materials-main-content .info-section {
        gap: 20px;
        padding: 10px 5px;
    }
}

@media (max-width: 768px) {
    .materials-single .materials-title-row .post-title {
        font-size: 26px;
    }

    .materials-single .materials-preview-badge {
        top: 12px;
        left: 22px;
        right: auto;
        width: 30px;
    }

    .materials-single .materials-action-buttons .action-button {
        flex: none;
        min-height: 72px;
    }
}

.materials-download-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 28px;
    border: 0;
    border-radius: 16px;
    color: #39434d;
    background: #fff;
    box-shadow: 0 20px 80px rgba(0, 0, 0, .2);
}

.materials-download-dialog::backdrop {
    background: rgba(25, 34, 42, .45);
}

.materials-download-dialog h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 600;
}

.materials-download-message {
    font-size: 15px;
    line-height: 1.8;
}

.materials-download-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.materials-download-dialog-actions button {
    padding: 12px 20px;
    border: 1px solid #e1e6e9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.materials-download-dialog-actions .materials-download-confirm {
    border-color: #DE6156;
    background: #DE6156;
    color: #fff;
}

.materials-download-dialog-actions button:disabled {
    opacity: .6;
    cursor: wait;
}

.materials-download-dialog [hidden] {
    display: none;
}

.materials-download-earn-link {
    margin-left: 6px;
    color: #2271b1;
    text-decoration: none;
}

.materials-download-earn-link:hover {
    text-decoration: underline;
}

.materials-single-page .c-toast {
    position: fixed;
    top: 50%;
    left: 0;
    z-index: 11000;
    width: 100%;
    transform: translateY(-50%);
    text-align: center;
    pointer-events: none;
}

.materials-single-page .c-toast__body {
    display: inline-block;
    max-width: calc(100% - 40px);
    padding: 14px 24px;
    border-radius: 10px;
    background: rgba(37, 44, 52, .92);
    color: #fff;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .15);
}

/* 相关推荐：瀑布流（CSS 多列），对齐 zishuai 素材详情页。 */
.related-posts-section {
    clear: both;
    padding: 40px 20px;
    background-color: #fff;
}

.related-posts-section .section-title {
    margin: 0;
    padding-left: 60px;
    color: #333;
    font-size: 1.6rem;
    text-align: left;
}

.modal-masonry-grid {
    column-count: 5;
    column-gap: 20px;
    column-fill: balance;
    orphans: 1;
    widows: 1;
    padding: 40px 60px;
}

.modal-masonry-grid .post-card {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s ease, transform .3s ease, box-shadow .3s ease;
}

.modal-masonry-grid .post-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

.modal-masonry-grid .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.modal-masonry-grid .post-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #fafafa;
}

.modal-masonry-grid .post-image > a {
    display: block;
}

.modal-masonry-grid .post-thumbnail,
.modal-masonry-grid .masonry-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform .3s ease;
}

.modal-masonry-grid .post-card:hover .masonry-thumbnail {
    transform: scale(1.05);
}

.modal-masonry-grid .post-content {
    padding: 12px;
}

.modal-masonry-grid .post-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.modal-masonry-grid .post-title a {
    color: inherit;
    text-decoration: none;
}

.modal-masonry-grid .post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #666;
    font-size: 12px;
}

.modal-masonry-grid .post-stats {
    display: flex;
    gap: 12px;
}

/* 覆盖 maoken.css 全局 .likes 的 140x160 盒子，恢复为小徽标。 */
.modal-masonry-grid .materials-card-likes {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    border: 0;
    cursor: default;
}
