
    .yn-sample-module * {
        box-sizing: border-box;
    }

    /* 强制隐藏类，专门用于覆盖系统自带脚本的控制 */
    .yn-hide-force {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    .yn-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0;
    }

    .yn-item {
        cursor: pointer;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        aspect-ratio: 91 / 102;
        overflow: hidden;
        padding: 10px;
    }

    .yn-landscape {
        padding: 0 11px 37px 11px;
    }

    .yn-portrait {
        padding: 0 40px 37px 40px;
    }

    .yn-item img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        border-radius: 3px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
        transition: transform .18s ease, box-shadow .18s ease;
    }

    .yn-item:hover img {
        transform: translateY(-2px);
    }

    .yn-viewer {
        position: fixed;
        inset: 0;
        background: #0b0b0b;
        display: none;
        z-index: 9999;
    }

    .yn-full-img {
        user-select: none;
        max-width: 75%;
        max-height: 80vh;
        object-fit: contain;
        opacity: 0;
        transition: opacity .18s ease, transform .25s ease;
        cursor: zoom-in;
    }

    .yn-full-img.yn-loaded {
        opacity: 1;
    }

    /* ===== 放大状态 ===== */
    .yn-full-img.yn-zoomed {
        cursor: grab;
        /* 缩放状态显示抓取手势 */
        transform: scale(2.0) translate(0px, 0px);
        /* 初始缩放 */
        transition: none !important;
        /* 拖拽时不能有过渡动画，否则会卡顿 */
    }

    .yn-full-img.yn-zoomed:active {
        cursor: grabbing;
    }

    @media (hover:hover) and (pointer:fine) {
        .yn-full-img {
            cursor: zoom-in;
        }
    }

    .yn-download {
        margin-top: 25px;
        padding: 5px 0;
        background: none;
        color: #888;
        border: none;
        border-bottom: 1px solid #444;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.3s;
        width: auto;
        display: inline-block;
        text-align: left;
        opacity: 0.6;
    }

    .yn-download:hover {
        color: #fff;
        opacity: 1;
        border-bottom-color: #fff;
    }

    .yn-viewer.active {
        display: block;
    }

    .yn-viewer-inner {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .yn-main {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px;
        gap: 40px;
        overflow: hidden;
        /* 关键：限制放大后的图片超出此边界 */
        position: relative;
        z-index: 5;
    }

    .yn-info {
        color: #ddd;
        max-width: 320px;
        font-size: 14px;
        line-height: 1.7;
        position: relative;
        z-index: 2;
        /* 初始层级较低 */
        transition: opacity 0.2s;
    }

    .yn-full-img.yn-zoomed~.yn-info {
        opacity: 0;
        pointer-events: none;
        /* 防止误触下载 */
    }

    .yn-filmstrip {
        position: relative;
        z-index: 20;
        background: #0b0b0b;
        height: 90px;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px;
        flex-shrink: 0;
    }

    .yn-filmstrip img {
        height: 70px;
        cursor: pointer;
        opacity: .6;
        transition: .2s;
    }

    .yn-filmstrip img.active {
        opacity: 1;
        border: 2px solid #fff;
    }

    .yn-close {
        position: absolute;
        top: 20px;
        right: 25px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .15);
        backdrop-filter: blur(4px);
        color: #fff;
        font-size: 36px;
        border: none;
        cursor: pointer;

        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 0;
        padding: 0;
        padding-top: 4px;

        transition: .2s;
        z-index: 30;
    }

    .yn-close:hover {
        background: rgba(255, 255, 255, .35);
        transform: scale(1.05);
    }

    .yn-prev,
    .yn-next {
        position: absolute;
        background: none;
        border: none;
        color: #fff;
        font-size: 36px;
        cursor: pointer;
        top: 50%;
        transform: translateY(-50%);
        z-index: 25;
    }

    .yn-prev {
        left: 20px;
    }

    .yn-next {
        right: 20px;
    }

    .yn-lock-scroll {
        overflow: hidden !important;
        height: 100vh !important;
    }

    .yn-photo-title {
        font-size: 18px;
        font-weight: 600;
        color: #fff;
        margin-bottom: 12px;
    }

    .yn-meta-row {
        margin-bottom: 6px;
    }

    .yn-meta-label {
        color: #797777;
        margin-right: 6px;
    }

    .yn-meta-value {
        color: #fff;
    }

    @media (max-width:768px) {

        /* =========================
       1. Viewer 容器高度
    ========================== */
        .yn-viewer-inner {
            height: 100vh;
            height: 100dvh;
        }

        /* =========================
       2. 主区域布局
    ========================== */
        .yn-main {
            flex: 1 1 auto;
            flex-direction: column;
            justify-content: center;
            overflow: hidden;
            padding: 8px 6px;
            gap: 12px;
        }

        /* =========================
       3. 图片显示
    ========================== */
        .yn-full-img {
            width: 100%;
            height: auto;
            max-width: 100%;
            max-height: 75vh;
            object-fit: contain;

        }

        /* =========================
       4. 信息区域压缩版
    ========================== */
        .yn-info {
            margin-top: 6px;
            font-size: 13px;
            line-height: 1.35;
            text-align: center;
        }

        .yn-photo-title {
            font-size: 15px;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 4px;
        }

        .yn-meta {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 6px;
        }

        .yn-meta-label {
            display: none;
        }

        .yn-meta-row {
            margin: 0;
        }

        .yn-meta-value {
            white-space: nowrap;
        }

        .yn-download {
            display: inline-block;
            margin-top: 6px;
            padding: 0;
            border: none;
            border-bottom: 1px solid #555;
            font-size: 13px;
        }

        /* =========================
       5. 胶片条固定
    ========================== */
        .yn-filmstrip {
            flex-shrink: 0;
            height: 75px;
            padding: 6px;
        }

        .yn-filmstrip img {
            height: 60px;
        }

        /* =========================
       6. 隐藏左右按钮
    ========================== */
        .yn-prev,
        .yn-next {
            display: none !important;
        }

        /* =========================
       7. 列表页缩略图
    ========================== */
        .yn-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .yn-item {
            display: flex;
            align-items: flex-end;
            justify-content: center;
            aspect-ratio: 91 / 102;
        }

        .yn-landscape,
        .yn-portrait {
            padding-bottom: 7px;
            padding-left: 0;
            padding-right: 0;
        }

    }
