/* 这里尝试调整banner特效，但未见效 */
/* .site-content {
    position: relative;
    z-index: 2;
    background: #fff;
}

body.page-id-2389.has-header-image .custome-header {
    position: relative;
    z-index: 1;
}

body.page-id-2389.has-header-image .custom-header-media {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 0;
}

body.page-id-2389.has-header-image .site-content {
    position: relative;
    z-index: 2;
    background: #fff;
} */

/* 这里开始设置gallery */

.anime-gallery-root {
    max-width: 1180px;
    margin: 60px auto;
    padding: 0 24px;
}

.anime-gallery-title {
    text-align: center;
    margin-bottom: 36px;
    color: #6b5572;
}

.anime-gallery-grid {
    columns: 3 260px;
    column-gap: 24px;
}

.anime-gallery-card {
    break-inside: avoid;
    margin: 0 0 24px;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 40px rgba(168, 128, 172, 0.16);
    cursor: pointer;
}

.anime-gallery-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

.anime-gallery-card:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(95, 74, 104, 0.48);
}

.anime-gallery-card h3 {
    margin: 12px 4px 2px;
    font-size: 16px;
    color: #6b5572;
}

.anime-gallery-danmaku-layer {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    overflow: hidden;
}

.anime-gallery-danmaku-layer.is-off {
    display: none;
}

.anime-gallery-danmaku-item {
    position: absolute;
    right: -360px;
    white-space: nowrap;

    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;

    animation-name: animeGalleryDanmakuMove;
    animation-timing-function: linear;
    animation-fill-mode: forwards;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    pointer-events: auto;
    cursor: pointer;
}

.anime-gallery-danmaku-item:hover {
    animation-play-state: paused;
}

.anime-gallery-danmaku-item.is-selected {
    z-index: 20;
    animation-play-state: paused;
}

.anime-gallery-danmaku-text {
    pointer-events: none;
}

.anime-gallery-danmaku-like-count {
    min-width: 12px;
    padding: 0;
    border-radius: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.anime-gallery-danmaku-like-count:empty {
    display: none;
}

.anime-gallery-danmaku-popover {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    display: inline-flex;
    align-items: baseline;
    gap: 10px;

    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;

    z-index: 30;
}

/* .anime-gallery-danmaku-popover.is-left {
    left: calc(100% + 12px);
    right: auto;
} */

.anime-gallery-danmaku-popover.is-right {
    left: calc(100% + 12px);
    right: auto;
}

.anime-gallery-danmaku-action {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;

    border: 0;
    border-radius: 0;
    padding: 0;
    margin: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    background: transparent;
    color: #111;
    line-height: 1;
}

.anime-gallery-danmaku-action svg {
    width: 19px;
    height: 19px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.anime-gallery-danmaku-action:hover,
.anime-gallery-danmaku-action.is-active {
    background: transparent;
    color: #000;
    transform: scale(1.2);
}

.anime-gallery-danmaku-action-report:hover,
.anime-gallery-danmaku-action-report.is-active {
    background: transparent;
    color: #000;
    transform: scale(1.2);
}

.anime-gallery-danmaku-action.is-active svg {
    fill: currentColor;
    stroke: none;
}

/* 点踩（闪电线）和举报（感叹号）的次级细节路径在实心图形上用白色描边保持可见 */
.anime-gallery-danmaku-action-dislike.is-active svg path:last-child,
.anime-gallery-danmaku-action-report.is-active svg path:not(:first-child) {
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes animeGalleryDanmakuMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-130vw);
    }
}

/* ==============================
   大图弹窗：全屏遮罩
============================== */

.anime-gallery-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    padding: 48px;
    box-sizing: border-box;
    background: rgba(35, 25, 45, 0.82);
    overflow: hidden;
}

.anime-gallery-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 打开弹窗时锁定页面滚动 */
body.anime-gallery-modal-open {
    overflow: hidden;
}

/* ==============================
   居中的查看器舞台
============================== */

.anime-gallery-modal-stage {
    position: relative;

    width: min(1480px, 100%);
    height: min(860px, calc(100vh - 96px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
}

/* ==============================
   图片查看区
============================== */

.anime-gallery-modal-image-area {
    position: relative;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.anime-gallery-modal-image {
    position: relative;
    z-index: 1;

    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;

    border-radius: 20px;
    background: #fff;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    transform-origin: center center;
    transition: transform 0.08s ease-out;
}

.anime-gallery-modal-image.is-dragging {
    cursor: grabbing;
    transition: none;
}

/* ==============================
   右侧评论面板
============================== */

.anime-gallery-modal-comments {
    position: relative;
    width: 340px;
    height: 100%;
    max-height: 100%;
    padding: 24px;
    box-sizing: border-box;

    border-radius: 28px;
    background: rgba(255, 255, 255, 0.95);
    color: #6b5572;
    box-shadow: 0 28px 70px rgba(35, 25, 45, 0.28);
    backdrop-filter: blur(14px);

    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.anime-gallery-comment-toggle {
    display: none;
}

.anime-gallery-comments-header {
    flex: 0 0 auto;
    margin-bottom: 16px;
}

.anime-gallery-comments-header h3 {
    margin: 0 0 8px;
    color: #5f4a68;
    font-size: 20px;
}

.anime-gallery-comments-header p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
    color: #856f8b;
}

.anime-gallery-comments-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 16px;
}

.anime-gallery-comment-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(120, 90, 130, 0.14);
}

.anime-gallery-comment-author {
    font-weight: 700;
    color: #5f4a68;
    margin-bottom: 6px;
}

.anime-gallery-comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: #6b5572;
    white-space: pre-wrap;
}

.anime-gallery-comment-time {
    margin-top: 6px;
    font-size: 12px;
    color: #aa98b0;
}

.anime-gallery-comments-empty,
.anime-gallery-comments-loading,
.anime-gallery-comments-error {
    margin: 0;
    font-size: 14px;
    color: #9b86a1;
}

.anime-gallery-comment-form {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anime-gallery-comment-input,
.anime-gallery-comment-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(120, 90, 130, 0.18);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #5f4a68;
    font-size: 14px;
}

.anime-gallery-comment-textarea {
    resize: vertical;
    min-height: 76px;
    max-height: 150px;
}

.anime-gallery-comment-submit {
    border: 0;
    border-radius: 0;
    padding: 10px 16px;
    background: #000;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.anime-gallery-comment-submit:hover {
    background: #111;
}

.anime-gallery-comment-message {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    color: #9b86a1;
}

.anime-gallery-comment-message[data-type="error"] {
    color: #b84c6a;
}

.anime-gallery-comment-message[data-type="success"] {
    color: #4c9b72;
}

.anime-gallery-comment-label {
    display: block;
    margin-bottom: -4px;
    font-size: 13px;
    font-weight: 700;
    color: #6b5572;
}

.anime-gallery-comment-label span {
    color: #d86b95;
}

.anime-gallery-comment-input,
.anime-gallery-comment-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(120, 90, 130, 0.18);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #5f4a68;
    font-size: 14px;
}

.anime-gallery-comment-textarea {
    resize: vertical;
    min-height: 86px;
    max-height: 160px;
}

.anime-gallery-modal-comments h3 {
    margin: 0 0 14px;
    color: #5f4a68;
    font-size: 20px;
}

.anime-gallery-modal-comments p {
    max-height: calc(100% - 48px);
    margin: 0;
    overflow-y: auto;
    line-height: 1.7;
}

/* ==============================
   关闭按钮
============================== */

.anime-gallery-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    right: auto;
    z-index: 50;

    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 32px;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;

    background: rgba(255, 255, 255, 0.94);
    color: #6b5572;
    box-shadow: 0 12px 36px rgba(35, 25, 45, 0.24);
}

.anime-gallery-modal-close:hover {
    background: #fff;
}

.anime-gallery-modal-close:focus-visible,
.anime-gallery-comment-toggle:focus-visible,
.anime-gallery-comment-submit:focus-visible,
.anime-gallery-danmaku-action:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(95, 74, 104, 0.42);
}

/* 底部弹幕输入 */
.anime-gallery-danmaku-controls {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);

    z-index: 9997;

    width: min(680px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 72px;
    gap: 10px;
    align-items: center;

    padding: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 14px 34px rgba(120, 80, 140, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.anime-gallery-danmaku-toggle {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background-image: none;
    box-shadow: none;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    background: #000;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.anime-gallery-danmaku-toggle:hover {
    background: #1b1b1b;
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}

.anime-gallery-danmaku-toggle:focus,
.anime-gallery-danmaku-toggle:focus-visible,
.anime-gallery-danmaku-toggle:active {
    background: #000;
    transform: translateY(0) scale(0.98);
    outline: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(255, 255, 255, 0.16) inset;
}

.anime-gallery-danmaku-toggle.is-off {
    background: #181818;
    color: rgba(255, 255, 255, 0.84);
}

.anime-gallery-danmaku-input {
    width: 100%;
    height: 38px;
    box-sizing: border-box;
    border: 1px solid rgba(160, 120, 170, 0.18);
    border-radius: 999px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.88);
    color: #6b5572;
    outline: none;
}

.anime-gallery-danmaku-input:focus {
    border-color: rgba(255, 160, 205, 0.72);
    box-shadow: 0 0 0 3px rgba(255, 160, 205, 0.18);
}

.anime-gallery-danmaku-send {
    height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    background-image: none;
    box-shadow: none;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: pointer;
    background: #000;
    color: #fff;
    font-weight: 700;
    transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.anime-gallery-danmaku-send:hover {
    background: #1b1b1b;
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}

.anime-gallery-danmaku-send:focus,
.anime-gallery-danmaku-send:focus-visible,
.anime-gallery-danmaku-send:active {
    background: #000;
    transform: translateY(0) scale(0.98);
    outline: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(255, 255, 255, 0.16) inset;
}

@media (max-width: 640px) {
    .anime-gallery-danmaku-controls {
        bottom: 14px;
        width: calc(100vw - 24px);
        grid-template-columns: 38px minmax(0, 1fr) 62px;
        gap: 8px;
        padding: 8px;
    }

    .anime-gallery-danmaku-toggle,
    .anime-gallery-danmaku-send,
    .anime-gallery-danmaku-input {
        height: 34px;
        font-size: 13px;
    }

    .anime-gallery-danmaku-toggle {
        width: 34px;
    }

    .anime-gallery-danmaku-item {
        font-size: 13px;
    }

    .anime-gallery-danmaku-action {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    .anime-gallery-danmaku-action svg {
        width: 20px;
        height: 20px;
    }
}

/* ==============================
   中等屏幕 / 平板横屏
============================== */

@media (max-width: 1180px) {
    .anime-gallery-modal {
        padding: 32px;
    }

    .anime-gallery-danmaku-action {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    .anime-gallery-danmaku-action svg {
        width: 20px;
        height: 20px;
    }

    .anime-gallery-modal-stage {
        height: min(820px, calc(100vh - 64px));
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 20px;
    }

    .anime-gallery-modal-comments {
        width: 300px;
        padding: 20px;
    }
}

.anime-gallery-load-status {
    margin: 28px auto 12px;
    text-align: center;
    color: #8a718f;
    font-size: 15px;
}

.anime-gallery-load-trigger {
    width: 100%;
    height: 1px;
}

/* ==============================
   窄屏通用
============================== */

@media (max-width: 820px) {
    .anime-gallery-danmaku-action {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    .anime-gallery-danmaku-action svg {
        width: 20px;
        height: 20px;
    }
}

/* ==============================
    触控设备：评论区底部抽屉
============================== */

@media (hover: none) and (pointer: coarse) {
    .anime-gallery-modal {
        padding: 0;
        height: 100dvh;
    }

    .anime-gallery-modal-stage {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        display: block;
    }

    .anime-gallery-modal-image-area {
        position: relative;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        box-sizing: border-box;
        border-radius: 0;
        align-items: center;
        justify-content: center;
        padding-top: 56px;
        padding-bottom: 72px;
    }

    .anime-gallery-modal-image {
        position: relative;
        z-index: 1;
        max-width: 96vw;
        max-height: calc(100vh - 128px);
        max-height: calc(100dvh - 128px);
        border-radius: 18px;
    }

    .anime-gallery-modal-comments {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10001;

        width: auto;
        height: auto;
        max-height: 72vh;
        max-height: 72dvh;
        padding: 22px 20px 28px;
        border-radius: 24px 24px 0 0;
        overflow-y: auto;

        pointer-events: none;
        transform: translateY(100%);
        transition: transform 0.28s ease;
    }

    .anime-gallery-modal-comments.is-open {
        pointer-events: auto;
        transform: translateY(0);
    }

    .anime-gallery-comment-toggle {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 0;
        z-index: 10002;

        display: none;
        border: 0;
        border-radius: 18px 18px 0 0;
        padding: 0;
        width: 190px;
        height: 26px;
        overflow: hidden;

        background: #fff;
        color: transparent;
        font-size: 0;
        line-height: 0;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
        cursor: pointer;
        transform: translateX(-50%);
        touch-action: none;
    }

    .anime-gallery-comment-toggle::before {
        content: "";
        position: absolute;
        top: 9px;
        left: 50%;
        width: 54px;
        height: 4px;
        border-radius: 999px;
        background: rgba(93, 74, 104, 0.28);
        transform: translateX(-50%);
    }

    .anime-gallery-modal.is-open .anime-gallery-comment-toggle {
        display: block;
    }

    .anime-gallery-modal.is-open .anime-gallery-comment-toggle[aria-expanded="true"] {
        display: none;
    }

    .anime-gallery-comments-textarea {
        min-height: 64px;
    }

    .anime-gallery-modal-comments h3 {
        margin-bottom: 8px;
        font-size: 16px;
    }

    .anime-gallery-modal-comments p {
        max-height: none;
        font-size: 14px;
    }

    .anime-gallery-modal-close {
        top: 12px;
        left: 12px;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 28px;
    }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
    .anime-gallery-modal-image-area {
        padding: 16px 18px;
    }

    .anime-gallery-modal-image {
        max-width: calc(100vw - 36px);
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }

    .anime-gallery-modal-close {
        top: 8px;
        left: 8px;
    }

    .anime-gallery-modal-comments {
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;

        width: min(360px, 44vw);
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 24px 0 0 24px;

        transform: translateX(100%);
    }

    .anime-gallery-modal-comments.is-open {
        transform: translateX(0);
    }

    .anime-gallery-comment-toggle {
        top: 50%;
        right: 0;
        bottom: auto;
        left: auto;
        width: 28px;
        min-width: 28px;
        height: 112px;
        min-height: 112px;
        padding: 0;
        border-radius: 18px 0 0 18px;
        transform: translateY(-50%);
    }

    .anime-gallery-comment-toggle::before {
        top: 50%;
        left: 10px;
        width: 4px;
        height: 54px;
        transform: translateY(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .anime-gallery-danmaku-item {
        animation: none;
        display: none;
    }

    .anime-gallery-modal-image,
    .anime-gallery-modal-comments,
    .anime-gallery-danmaku-toggle,
    .anime-gallery-danmaku-send {
        transition: none;
    }
}

