/* 模组详情：隐藏右侧作者信息 / 排行榜 / 文章展示，主栏全宽 */
body.single-post .sidebar-wrapper,
body.single .sidebar-wrapper {
    display: none !important;
}

body.single-post .content-wrapper,
body.single .content-wrapper {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* 模组详情 · 金橙亮/暗色 */
.ptg-mod-detail {
    --ptg-m-bg: #f7f9fc;
    --ptg-m-card: #ffffff;
    --ptg-m-text: #1f2329;
    --ptg-m-sub: #6b7280;
    --ptg-m-muted: #9ca3af;
    --ptg-m-border: #ececf0;
    --ptg-m-accent: #ff5000;
    --ptg-m-gold-soft: #fff7ed;
    --ptg-m-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

[data-bs-theme="dark"] .ptg-mod-detail,
.ptg-mod-detail[data-theme="dark"] {
    --ptg-m-bg: #121214;
    --ptg-m-card: #1a1a1c;
    --ptg-m-text: #f3f4f6;
    --ptg-m-sub: #b9a894;
    --ptg-m-muted: #8a8074;
    --ptg-m-border: #2e2e32;
    --ptg-m-gold-soft: #3a3024;
    --ptg-m-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.ptg-mod-detail .ptg-mod-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 24px;
}

.ptg-mod-hero-top {
    display: block;
}

.ptg-mod-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: stretch;
}

.ptg-mod-gallery {
    min-height: 0;
    align-self: start;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 16px;
    box-shadow: var(--ptg-m-shadow);
    padding: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.ptg-mod-gallery-main {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: #0e0e10;
    cursor: zoom-in;
}

.ptg-mod-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.ptg-mod-zoom-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 15px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.ptg-mod-gallery-main:hover .ptg-mod-zoom-hint,
.ptg-mod-gallery-main:focus .ptg-mod-zoom-hint,
.ptg-mod-gallery-main:focus-within .ptg-mod-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}

.ptg-mod-gallery-main:hover .ptg-mod-zoom-hint {
    background: rgba(255, 80, 0, 0.9);
}

.ptg-mod-thumbs {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    margin-top: 10px;
    /* 滚动条浮在缩略图底部，不额外撑开布局 */
    margin-bottom: -8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.ptg-mod-thumbs:hover,
.ptg-mod-thumbs:focus-within {
    scrollbar-color: rgba(255, 80, 0, 0.55) transparent;
}

.ptg-mod-thumbs::-webkit-scrollbar {
    height: 6px;
    background: transparent;
}

.ptg-mod-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.ptg-mod-thumbs::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.ptg-mod-thumbs:hover::-webkit-scrollbar-thumb,
.ptg-mod-thumbs:focus-within::-webkit-scrollbar-thumb {
    background: rgba(255, 80, 0, 0.55);
}

.ptg-mod-thumbs::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 80, 0, 0.75);
}

.ptg-mod-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .75;
    padding: 0;
    background: none;
}

.ptg-mod-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ptg-mod-thumb.active,
.ptg-mod-thumb:hover {
    opacity: 1;
    border-color: var(--ptg-m-accent);
}

.ptg-mod-info {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ptg-mod-title {
    margin: 0;
    font-size: clamp(20px, 2.6vw, 26px);
    font-weight: 800;
    line-height: 1.35;
    color: var(--ptg-m-text);
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

.ptg-mod-title-text {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ptg-mod-badge-oneclick {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: 0;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: #fff;
    background: rgba(64, 158, 255, 0.9);
    white-space: nowrap;
}

.ptg-mod-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 0;
    flex: 0 0 auto;
}

.ptg-mod-stat {
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: var(--ptg-m-shadow);
}

.ptg-mod-stat .n {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--ptg-m-accent);
    line-height: 1.2;
}

.ptg-mod-stat .l {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ptg-m-sub);
}

.ptg-mod-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0;
    align-items: stretch;
    flex: 0 0 auto;
}

.ptg-mod-actions .ptg-mod-dl-primary {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ptg-mod-actions .btn,
.ptg-mod-actions .ptg-mod-fav {
    border-radius: 12px;
    font-weight: 700;
}

/* 去掉「免费下载」提示行 */
.ptg-mod-actions .buy-title {
    display: none !important;
}

.ptg-mod-dl-primary .btn-group,
.ptg-mod-dl-primary .d-block,
.ptg-mod-dl-primary .ptg-mod-dl-seg {
    width: 100%;
}

.ptg-mod-dl-primary .btn-group {
    display: flex;
    width: 100%;
}

/* 多源下载：合成一个三分段按钮 */
.ptg-mod-dl-seg {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(255, 80, 0, 0.22);
    background: linear-gradient(90deg, #ff8c00, #ff5000);
}

.ptg-mod-dl-seg__cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
    position: relative;
}

.ptg-mod-dl-seg__cell + .ptg-mod-dl-seg__cell {
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.ptg-mod-dl-seg__part {
    flex: 1 1 auto;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 8px;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: none !important;
    white-space: nowrap;
}

.ptg-mod-dl-seg__part:hover {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}

.ptg-mod-dl-seg__part i {
    font-size: 12px;
    opacity: 0.95;
}

.ptg-mod-dl-seg__pwd {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.12);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.ptg-mod-dl-seg__pwd:hover {
    background: rgba(0, 0, 0, 0.22);
}

.ptg-mod-dl-primary .btn-success,
.ptg-mod-dl-primary .btn-danger,
.ptg-mod-dl-primary .btn-info {
    flex: 1 1 auto;
    width: 100%;
    background: linear-gradient(90deg, #ff8c00, #ff5000) !important;
    border: 0 !important;
    color: #fff !important;
    padding: 12px 18px;
    box-shadow: 0 8px 18px rgba(255, 80, 0, 0.22);
}

.ptg-mod-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid var(--ptg-m-border);
    background: var(--ptg-m-card);
    color: var(--ptg-m-text);
    text-decoration: none;
    box-sizing: border-box;
}

@media (max-width: 575.98px) {
    .ptg-mod-actions {
        grid-template-columns: 1fr;
    }
}

.ptg-mod-fav:hover {
    border-color: rgba(255, 80, 0, 0.4);
    color: var(--ptg-m-accent);
}

.ptg-mod-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: var(--ptg-m-shadow);
    flex: 1 1 auto;
    min-height: 0;
    align-content: space-evenly;
}

.ptg-mod-meta-item {
    display: grid !important;
    grid-template-columns: 4.5em minmax(0, 1fr);
    align-items: center;
    column-gap: 6px;
    min-width: 0;
    padding: 2px 0;
}

.ptg-mod-meta-item .k {
    display: block;
    font-size: 12px;
    color: var(--ptg-m-muted);
    white-space: nowrap;
    text-align: right !important;
}

.ptg-mod-meta-item .k::after {
    content: "：";
}

.ptg-mod-meta-item .v {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ptg-m-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ptg-mod-meta-item .v a {
    color: inherit;
    text-decoration: none;
}

.ptg-mod-meta-item .v a:hover {
    color: var(--ptg-m-accent);
}

/* 右侧内嵌：模组管理器推广，贴在基础信息下方 */
.ptg-mod-info .apg-mod-manager-promo.ptg-mod-manager-inline {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    gap: 10px;
    flex: 0 0 auto;
    margin-top: auto;
}

.ptg-mod-info .ptg-mod-manager-inline .apg-mod-manager-text {
    font-size: 13px;
    min-width: 0;
    flex: 1 1 auto;
}

.ptg-mod-info .ptg-mod-manager-inline .apg-mod-manager-text span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ptg-mod-info .ptg-mod-manager-inline .apg-mod-manager-btn {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 8px;
    flex: 0 0 auto;
}

/* 模组详情：下划线 Tab + 版本竖向折叠 */
.ptg-mod-tabs {
    margin-top: 8px;
}

.ptg-mod-tablist {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--ptg-m-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ptg-mod-tab {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ptg-m-sub);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    padding: 12px 18px 14px;
    cursor: pointer;
    transition: color .15s ease;
}

.ptg-mod-tab:hover {
    color: var(--ptg-m-text);
    background: transparent;
}

.ptg-mod-tab.is-active {
    color: var(--ptg-m-accent, #ff5000);
    background: transparent;
}

.ptg-mod-tab.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: linear-gradient(90deg, #ff8c00, #ff5000);
}

.ptg-mod-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35em;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.5;
    background: rgba(255, 80, 0, 0.1);
    color: var(--ptg-m-accent, #ff5000);
}

.ptg-mod-tab.is-active .ptg-mod-tab-count {
    background: rgba(255, 80, 0, 0.16);
    color: inherit;
}

.ptg-mod-tabpanel[hidden] {
    display: none !important;
}

.ptg-mod-section {
    margin: 28px 0 18px;
}

.ptg-mod-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 800;
    color: var(--ptg-m-text);
}

.ptg-mod-section-title::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #ff8c00, #ff5000);
}

.ptg-mod-intro {
    position: relative;
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: var(--ptg-m-shadow);
}

.ptg-mod-versions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ptg-mod-versions.is-stack {
    gap: 10px;
}

.ptg-mod-ver-item {
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 14px;
    box-shadow: var(--ptg-m-shadow);
    overflow: hidden;
}

.ptg-mod-ver-item.is-latest {
    border-color: rgba(255, 80, 0, 0.35);
}

.ptg-mod-ver-acc-hd {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
    border: 0;
    background: transparent;
    color: var(--ptg-m-text);
    text-align: left;
    cursor: pointer;
}

.ptg-mod-ver-acc-hd:hover {
    background: rgba(255, 80, 0, 0.04);
}

.ptg-mod-ver-acc-caret {
    margin-left: auto;
    color: var(--ptg-m-sub);
    transition: transform .18s ease;
}

.ptg-mod-ver-item.is-open .ptg-mod-ver-acc-caret {
    transform: rotate(180deg);
    color: var(--ptg-m-accent);
}

.ptg-mod-ver-acc-bd[hidden] {
    display: none !important;
}

.ptg-mod-ver-acc-bd .ptg-mod-ver-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--ptg-m-border);
    padding-top: 12px;
}

.ptg-mod-ver-card {
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--ptg-m-shadow);
}

.ptg-mod-ver-hd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.ptg-mod-ver-tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, #ff8c00, #ff5000);
}

.ptg-mod-ver-tag.is-latest {
    box-shadow: 0 0 0 2px rgba(255, 80, 0, 0.15);
}

.ptg-mod-ver-meta {
    font-size: 12px;
    color: var(--ptg-m-sub);
}

.ptg-mod-ver-desc {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ptg-m-sub);
}

.ptg-mod-ver-desc-body {
    word-break: break-word;
}

.ptg-mod-ver-desc-body .ptg-mod-ver-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ptg-mod-ver-log__block {
    margin: 0;
}

.ptg-mod-ver-log__title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ptg-m-text, inherit);
    letter-spacing: 0.02em;
}

.ptg-mod-ver-log__list {
    margin: 0;
    padding: 0 0 0 1.15em;
    list-style: disc;
}

.ptg-mod-ver-log__list li {
    margin: 0 0 4px;
    padding: 0;
    line-height: 1.65;
}

.ptg-mod-ver-log__list li:last-child {
    margin-bottom: 0;
}

.ptg-mod-ver-log__p {
    margin: 0;
    white-space: pre-wrap;
}

.ptg-mod-ver-desc:empty {
    display: none;
}

.ptg-mod-comments-panel {
    background: var(--ptg-m-card);
    border: 1px solid var(--ptg-m-border);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--ptg-m-shadow);
}

.ptg-mod-base-license-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0 20px;
    align-items: stretch;
}

.ptg-mod-base-license-row.is-single {
    grid-template-columns: 1fr;
}

.ptg-mod-base-license-row .apg-preinstall-wrapper,
.ptg-mod-base-license-row .apg-license-wrapper {
    margin: 0;
    height: 100%;
}

@media (max-width: 992px) {
    .ptg-mod-base-license-row {
        grid-template-columns: 1fr;
    }
}

.ptg-mod-ver-dls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ptg-mod-ver-dls .ptg-mod-dl-seg {
    width: 100%;
    min-height: 42px;
    box-shadow: 0 6px 14px rgba(255, 80, 0, 0.18);
}

.ptg-mod-ver-dls .ptg-mod-dl-seg__part {
    padding: 10px 8px;
    font-size: 12px;
}

.ptg-mod-ver-dls .apg-postcontent-download-btn,
.ptg-mod-ver-dls a.btn {
    border-radius: 10px !important;
}

/* 灯箱预览：全屏大图，关闭在视口右上，缩略图贴浏览器底 */
.ptg-mod-lightbox[hidden] {
    display: none !important;
}

.ptg-mod-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: block;
}

.ptg-mod-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.ptg-mod-lightbox-dialog {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    top: 0;
    bottom: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 72px 12px;
    box-sizing: border-box;
    pointer-events: none;
}

.ptg-mod-lightbox-stage {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
    pointer-events: auto;
}

.ptg-mod-lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}

.ptg-mod-lightbox-stage.is-zoomable {
    cursor: grab;
}

.ptg-mod-lightbox-stage.is-dragging {
    cursor: grabbing;
}

.ptg-mod-lightbox-close,
.ptg-mod-lightbox-nav {
    position: fixed;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
    z-index: 10060;
    font-size: 18px;
    backdrop-filter: blur(6px);
}

.ptg-mod-lightbox-close:hover,
.ptg-mod-lightbox-nav:hover {
    background: rgba(255, 80, 0, 0.95);
}

.ptg-mod-lightbox-close {
    top: 18px;
    right: 18px;
}

.ptg-mod-lightbox-nav.is-prev {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.ptg-mod-lightbox-nav.is-next {
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.ptg-mod-lightbox-hint {
    position: fixed;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    z-index: 10055;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    white-space: nowrap;
}

.ptg-mod-lightbox-thumbs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10060;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.88) 28%);
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.ptg-mod-lightbox-thumbs:hover,
.ptg-mod-lightbox-thumbs:focus-within {
    scrollbar-color: rgba(255, 80, 0, 0.55) transparent;
}

.ptg-mod-lightbox-thumbs::-webkit-scrollbar {
    height: 6px;
    background: transparent;
}

.ptg-mod-lightbox-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.ptg-mod-lightbox-thumbs::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.ptg-mod-lightbox-thumbs:hover::-webkit-scrollbar-thumb,
.ptg-mod-lightbox-thumbs:focus-within::-webkit-scrollbar-thumb {
    background: rgba(255, 80, 0, 0.55);
}

.ptg-mod-lightbox-thumb {
    flex: 0 0 88px;
    width: 88px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    opacity: .72;
}

.ptg-mod-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ptg-mod-lightbox-thumb.is-active,
.ptg-mod-lightbox-thumb:hover {
    opacity: 1;
    border-color: #ff5000;
}

body.ptg-lightbox-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .ptg-mod-lightbox-dialog {
        bottom: 88px;
        padding: 52px 48px 8px;
    }

    .ptg-mod-lightbox-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }

    .ptg-mod-lightbox-nav.is-prev {
        left: 8px;
    }

    .ptg-mod-lightbox-nav.is-next {
        right: 8px;
    }

    .ptg-mod-lightbox-hint {
        bottom: 92px;
    }

    .ptg-mod-lightbox-thumb {
        flex: 0 0 72px;
        width: 72px;
        height: 46px;
    }
}

@media (max-width: 992px) {
    .ptg-mod-hero-body {
        grid-template-columns: 1fr;
    }

    .ptg-mod-gallery-main {
        max-height: 320px;
        aspect-ratio: 16 / 10;
        flex: 0 0 auto;
    }

    .ptg-mod-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .ptg-mod-info .apg-mod-manager-promo.ptg-mod-manager-inline {
        margin-top: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .ptg-mod-info .ptg-mod-manager-inline .apg-mod-manager-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .ptg-mod-meta-grid {
        grid-template-columns: 1fr;
    }
}

/* 详情页底部「相关文章」：封面须填满 ratio 区（勿用 position:relative 压过 .ratio>*） */
.related-posts .post-item .entry-media.ratio > .media-img.has-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-image: none !important;
    background-color: #e7e7e7;
}

.related-posts .post-item .entry-media .media-img .ptg-card-cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    z-index: 1;
}
