/* 寻梦软件目录 — 与子比等浅色主题协调，强调色由 --xm-app-accent 控制 */

/* 与子比 zib_head_css() 输出的 --theme-color 对齐（含深色模式切换） */
.xm-app-accent-from-theme {
    --xm-app-accent: var(--theme-color, #e53935);
}

/* 落在子比 page-article / wp-posts-content 内时收紧顶边距 */
.page-article .xm-app-catalog,
.xm-app-archive-inner .xm-app-catalog {
    margin-top: 0;
}

/* 与完整目录页一致：面包屑 → 热门横滑 → 筛选 → 网格；避免子比正文区 flex/limit-height 只露出首块 */
.wp-posts-content .xm-app-catalog-shell,
.wp-posts-content .xm-app-catalog {
    display: block;
    width: 100%;
    max-width: 100%;
    clear: both;
    box-sizing: border-box;
}

.limit-height .wp-posts-content .xm-app-catalog-shell,
.limit-height .wp-posts-content .xm-app-catalog,
.article.limit-height .wp-posts-content .xm-app-catalog {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* 筛选区保持块级；网格必须用 grid，勿写 display:block 否则会盖掉 .xm-app-grid 的多列布局 */
.wp-posts-content .xm-app-filters {
    display: block;
    width: 100%;
    clear: both;
}

.wp-posts-content .xm-app-grid {
    width: 100%;
    max-width: 100%;
    clear: both;
    min-width: 0;
}

/* 与子比 theme-box 同级的目录外壳（非子比主题时仍有独立样式） */
.xm-app-catalog-shell:not(.theme-box) {
    background: var(--main-bg-color, #fff);
    border-radius: var(--main-radius, 8px);
    box-shadow: 0 0 10px var(--main-shadow, rgba(116, 116, 116, 0.08));
    padding: 1.25rem 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.xm-app-catalog-shell.theme-box {
    padding: 1.25rem 1.25rem 1.5rem;
}

@media (max-width: 576px) {
    .xm-app-catalog-shell:not(.theme-box),
    .xm-app-catalog-shell.theme-box {
        padding: 1rem;
    }
}

.xm-app-catalog {
    --xm-app-radius: 12px;
    --xm-app-muted: #6b7280;
    --xm-app-bg: #f9fafb;
    margin: 0 0 1.5rem;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
}

.xm-app-catalog-shell .xm-app-catalog {
    margin-bottom: 0;
}

.xm-app-breadcrumb {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2em;
    margin-bottom: 1rem;
    font-size: 13px;
    line-height: 1.4;
    color: var(--xm-app-muted, #6b7280);
}

.xm-app-breadcrumb a {
    flex: 0 0 auto;
    color: var(--xm-app-accent, #e53935);
    text-decoration: none;
    white-space: nowrap;
}

.xm-app-breadcrumb a:hover {
    opacity: 0.85;
}

.xm-app-bc-sep,
.xm-app-bc-current {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* —— 热门横栏：仅调「上下」留白时改这里即可 ——
 * 外框上下：.xm-app-hot-inner 的 padding 第 1、3 个值（上、下）
 * 横滑区上下：.xm-app-hot-scroll 的 padding 第 1、3 个值（上、下）；左侧第 4 个值为角标留空，勿当上下边距改
 * 与下面筛选的间距：.xm-app-hot 的 margin-bottom
 */
.xm-app-hot {
    margin-bottom: 0.75rem;
}

.xm-app-hot-inner {
    position: relative;
    background: var(--xm-app-bg, #f9fafb);
    border-radius: var(--xm-app-radius);
    padding: 0.06rem 0.35rem 0.06rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: hidden;
    overflow-y: visible;
}

.xm-app-hot-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--xm-app-accent, #e53935);
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-bottom-right-radius: 8px;
    font-weight: 600;
    z-index: 2;
}

.xm-app-hot-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.08rem 0.25rem 0.04rem 2.85rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.xm-app-hot-item {
    flex: 0 0 auto;
    width: 76px;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.xm-app-hot-icon-wrap {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 6px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.xm-app-hot-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xm-app-hot-title {
    display: block;
    font-size: 12px;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

.xm-app-hot-empty {
    margin: 0.35rem 0 0.15rem;
    padding: 0.25rem 0.5rem 0.2rem 2.85rem;
    font-size: 13px;
    color: var(--xm-app-muted, #6b7280);
    line-height: 1.55;
}

.xm-app-filters {
    margin-bottom: 1rem;
}

/* 筛选：白底、紧凑；选中为粉/红底圆角块，其余纯文字；无分类缩略图 */
.xm-app-filters--card {
    background: #fff;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    padding: 0.35rem 0 0.45rem;
    margin-bottom: 1rem;
}

.xm-app-filters--card .xm-app-filter-row:last-child {
    margin-bottom: 0;
}

.xm-app-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.4rem;
}

.xm-app-filter-label {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 4.75em;
    min-height: 32px;
    font-weight: 600;
    color: #1f2937;
    padding-top: 0;
    font-size: 14px;
    line-height: 1.25;
}

.xm-app-filter-chips {
    flex: 1 1 200px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: 2px 14px;
}

a.xm-app-chip {
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

/* 图二：选中为粉/红底圆角块，其余为纯文字；全部项同一 flex 盒模型保证与标签垂直对齐 */
.xm-app-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    padding: 4px 4px;
    min-height: 32px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    cursor: pointer;
    color: #1f2937;
    transition: color 0.15s, background 0.15s;
}

.xm-app-chip:hover {
    border: none;
    color: var(--xm-app-accent, #e53935);
    background: transparent;
}

.xm-app-chip.is-active {
    background: var(--xm-app-accent, #e53935);
    border: none;
    color: #fff;
    font-weight: 500;
    padding: 6px 14px;
    min-height: 32px;
    border-radius: 8px;
}

.xm-app-chip.is-active:hover {
    color: #fff;
    opacity: 0.92;
}

/* start：同行卡片按内容高度，避免 stretch 把矮卡片底部拉出一截空白（图二问题） */
.xm-app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

@media (min-width: 640px) {
    .xm-app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (min-width: 900px) {
    .xm-app-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1100px) {
    .xm-app-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }
}

.xm-app-card {
    min-width: 0;
    max-width: 100%;
    background: #fff;
    border-radius: var(--xm-app-radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.xm-app-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.xm-app-card-link {
    display: block;
    padding: 4px 6px 6px;
    text-decoration: none;
    color: inherit;
}

.xm-app-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.xm-app-heat {
    font-size: 12px;
    font-weight: 500;
    color: var(--xm-app-muted, #6b7280);
}

.xm-app-stars {
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1;
}

.xm-app-star.is-on {
    color: #f59e0b;
}

.xm-app-star.is-off {
    color: #e5e7eb;
}

.xm-app-icon-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 5px;
    background: var(--xm-app-bg, #f9fafb);
}

.xm-app-discount-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background: var(--xm-app-accent, #e53935);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    transform: rotate(-12deg) translate(-4px, 4px);
    transform-origin: left top;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.xm-app-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xm-app-card-title {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xm-app-card-extra {
    margin: 0 0 6px;
    font-size: 11px;
    color: var(--xm-app-muted, #6b7280);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xm-app-tagline {
    margin: 0;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: var(--xm-app-accent, #e53935);
    line-height: 1.3;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 目录底部分页 */
.xm-app-pagination {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-pagination__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.xm-app-pagination__item {
    margin: 0;
    padding: 0;
}

.xm-app-pagination__ellipsis {
    padding: 0 4px;
    color: var(--xm-app-muted, #6b7280);
    user-select: none;
}

.xm-app-page-link,
.xm-app-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    box-sizing: border-box;
}

.xm-app-page-link {
    text-decoration: none;
    color: #374151;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.xm-app-page-link:hover {
    border-color: var(--xm-app-accent, #e53935);
    color: var(--xm-app-accent, #e53935);
}

.xm-app-page-link--nav {
    min-width: auto;
    padding: 0 14px;
}

.xm-app-page-current {
    font-weight: 700;
    color: #fff;
    background: var(--xm-app-accent, #e53935);
    border: 1px solid var(--xm-app-accent, #e53935);
}

.xm-app-card.xm-is-hidden {
    display: none;
}

.xm-app-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--xm-app-muted, #6b7280);
}

/* —— 软件详情页（正文前信息区） */

.xm-app-single-panel {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--xm-app-radius, 12px);
    background: var(--xm-app-bg, #f9fafb);
    font-size: 14px;
    line-height: 1.55;
}

.xm-app-single-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
}

.xm-app-single-dl dt {
    margin: 0;
    font-weight: 600;
    color: #374151;
}

.xm-app-single-dl dd {
    margin: 0;
    color: #1f2937;
}

.xm-app-single-block {
    margin: 1rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-single-block:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.xm-app-single-h {
    margin: 0 0 0.5rem;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.xm-app-single-requirements,
.xm-app-changelog-body {
    color: #374151;
    word-break: break-word;
}

.xm-app-single-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 0.25rem;
}

.xm-app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.15s, transform 0.15s;
}

.xm-app-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.xm-app-btn-primary {
    background: var(--xm-app-accent, #e53935);
    color: #fff !important;
    border: 1px solid transparent;
}

.xm-app-btn-outline {
    background: #fff;
    color: var(--xm-app-accent, #e53935) !important;
    border: 1px solid var(--xm-app-accent, #e53935);
}

.xm-app-shot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.xm-app-shot-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.xm-app-shot-item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.xm-app-shot-img {
    width: 100%;
    height: auto;
    vertical-align: middle;
    display: block;
}

.xm-app-single-after-panel {
    height: 0;
}

/* —— 软件详情双栏（参考：左栏下载+推荐 / 右栏介绍+截图+最新） */

.xm-app-detail-article {
    overflow: visible;
}

.xm-app-detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 991px) {
    .xm-app-detail-grid {
        grid-template-columns: 1fr;
    }
}

.xm-app-detail-aside {
    position: sticky;
    top: 1rem;
}

@media (max-width: 991px) {
    .xm-app-detail-aside {
        position: static;
    }
}

.xm-app-detail-bc {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2em;
    font-size: 12px;
    color: var(--xm-app-muted, #6b7280);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.xm-app-detail-bc a {
    flex: 0 0 auto;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.xm-app-detail-bc a:hover {
    color: var(--xm-app-accent, #e53935);
}

.xm-app-detail-bc .xm-app-bc-sep,
.xm-app-detail-bc > span:not(.xm-app-bc-sep) {
    flex: 0 0 auto;
    white-space: nowrap;
}

.xm-app-detail-title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.xm-app-detail-cover {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    margin-bottom: 1rem;
}

.xm-app-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.xm-app-detail-tax {
    margin-bottom: 1rem;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 详情左栏：游戏分类 + 游戏类型同一横排（窄屏自动折行） */
.xm-app-detail-tax--row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1.25rem;
    row-gap: 0.35rem;
}

.xm-app-detail-tax-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.xm-app-detail-tax-label {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin: 0;
    white-space: nowrap;
}

.xm-app-detail-tax-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.xm-app-tax-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    color: var(--xm-app-accent, #e53935) !important;
    border: 1px solid rgba(229, 57, 53, 0.35);
    background: #fff;
    transition: background 0.15s, color 0.15s;
}

.xm-app-tax-chip.has-img img {
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.xm-app-tax-chip:hover {
    background: var(--xm-app-accent, #e53935);
    color: #fff !important;
}

.xm-app-tax-none {
    font-size: 12px;
    color: var(--xm-app-muted, #6b7280);
}

.xm-app-detail-main-tax {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: #374151;
}

.xm-app-detail-main-tax-label {
    font-weight: 700;
    color: #111827;
}

.xm-app-detail-main-tax-values a {
    color: var(--xm-app-accent, #e53935);
    text-decoration: none;
    font-weight: 600;
}

.xm-app-detail-main-tax-values a:hover {
    text-decoration: underline;
}

.xm-app-main-tax-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.xm-app-main-tax-pill.has-img img {
    border-radius: 4px;
    object-fit: cover;
    vertical-align: middle;
}

.xm-app-detail-main-tax-sep {
    display: inline-block;
}

@media (max-width: 600px) {
    .xm-app-detail-main-tax-sep {
        display: block;
        height: 6px;
    }
}

.xm-app-dl-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1rem;
}

.xm-app-dl-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.xm-app-dl-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    color: #fff !important;
    border: none;
    min-height: 44px;
    transition: opacity 0.15s, transform 0.15s;
}

.xm-app-dl-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    color: #fff !important;
}

.xm-app-dl-green {
    background: linear-gradient(180deg, #2e7d32 0%, #1b5e20 100%);
}

.xm-app-dl-blue {
    background: linear-gradient(180deg, #1976d2 0%, #0d47a1 100%);
}

.xm-app-dl-accent {
    background: var(--xm-app-accent, #e53935);
}

.xm-app-qr-trigger {
    flex: 0 0 44px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    color: #374151;
}

.xm-app-qr-trigger:hover {
    border-color: var(--xm-app-accent, #e53935);
    color: var(--xm-app-accent, #e53935);
}

.xm-app-detail-req {
    font-size: 12px;
    color: #4b5563;
    margin-bottom: 1rem;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.xm-app-aside-latest {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
}

.xm-app-aside-rec {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.xm-app-aside-rec-h {
    margin: 0 0 0.5rem;
    font-size: 14px;
    font-weight: 700;
}

.xm-app-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

/* 侧栏：最新上线 3×4、精选推荐 3×2（列数均为 3，行数由条目数决定） */
.xm-app-mini-grid--latest,
.xm-app-mini-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.xm-app-detail-aside .xm-app-mini-icon-wrap {
    border-radius: 16px;
}

.xm-app-mini-empty {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 12px;
    color: var(--xm-app-muted, #6b7280);
}

.xm-app-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none !important;
    color: inherit !important;
    font-size: 11px;
    line-height: 1.25;
}

.xm-app-mini-card.is-row {
    flex: 0 0 auto;
    width: 72px;
}

.xm-app-mini-icon-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 4px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-mini-card.is-row .xm-app-mini-icon-wrap {
    width: 52px;
    height: 52px;
}

.xm-app-mini-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.xm-app-mini-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background: var(--xm-app-accent, #e53935);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 4px;
    line-height: 1.2;
    border-bottom-right-radius: 4px;
}

.xm-app-mini-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
}

.xm-app-detail-main {
    min-width: 0;
}

.xm-app-tablist {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.xm-app-tab-btn {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
}

.xm-app-tab-btn.is-active {
    color: var(--xm-app-accent, #e53935);
    border-bottom-color: var(--xm-app-accent, #e53935);
}

.xm-app-tab-panel {
    margin-bottom: 1.25rem;
}

.xm-app-detail-content {
    font-size: 15px;
    line-height: 1.75;
    color: #1f2937;
}

.xm-app-section-h {
    margin: 0 0 0.75rem;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
}

.xm-app-shot-section {
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-shot-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.xm-app-shot-strip-item {
    flex: 0 0 auto;
    width: 140px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.xm-app-shot-strip-img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

/* 二维码浮层 */
.xm-app-qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.xm-app-qr-overlay.is-open {
    display: flex;
}

.xm-app-qr-inner {
    position: relative;
    background: #fff;
    padding: 1.5rem 1rem 1rem;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
}

.xm-app-qr-inner img {
    max-width: 260px;
    max-height: 70vh;
    width: auto;
    height: auto;
    display: block;
}

.xm-app-qr-close {
    position: absolute;
    top: 4px;
    right: 8px;
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

/* 详情 · 软件介绍区块 */
.xm-app-soft-intro {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-soft-intro-text {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
}

.xm-app-intro-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.xm-app-intro-gallery-item {
    display: block;
    max-width: 200px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-intro-gallery-item img {
    width: 100%;
    height: auto;
    vertical-align: middle;
    display: block;
}

/* 前台发布表单 */
.xm-app-submit-wrap {
    margin: 1rem 0;
}

.xm-app-submit-notice,
.xm-app-submit-success {
    padding: 1rem;
    border-radius: var(--xm-app-radius, 12px);
    background: var(--xm-app-bg, #f9fafb);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-app-submit-success {
    border-color: rgba(46, 125, 50, 0.35);
    background: #f1f8f4;
}

.xm-app-submit-form .xm-app-sf-input.wide,
.xm-app-submit-form .xm-app-sf-textarea.wide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.xm-app-submit-form .xm-app-sf-fs {
    margin: 1rem 0;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
}

.xm-app-submit-form .xm-app-sf-checkboxes label {
    display: inline-block;
    margin: 4px 12px 4px 0;
}

.xm-app-submit-form .xm-app-sf-dl-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

@media (max-width: 600px) {
    .xm-app-submit-form .xm-app-sf-dl-row {
        grid-template-columns: 1fr;
    }
}

.xm-app-submit-form .xm-app-sf-submit {
    margin-top: 0.5rem;
}
