/* ==========================================================================
   文枢CMS 官网 · 样式表
   配色参考：slate 灰阶 + indigo 主色 + teal 辅助色
   ========================================================================== */

:root {
    --brand:        #4f46e5;
    --brand-dark:   #4338ca;
    --brand-light:  #6366f1;
    --brand-50:     #eef2ff;
    --brand-100:    #c7d2fe;
    --brand-ring:   rgba(99, 102, 241, .18);

    --teal:         #14b8a6;
    --teal-dark:    #0f766e;
    --teal-50:      #ecfdf5;

    --ink:          #1e293b;
    --ink-2:        #334155;
    --ink-3:        #475569;
    --muted:        #64748b;
    --muted-2:      #94a3b8;

    --line:         #e2e8f0;
    --line-soft:    #edf2f7;
    --bg:           #f8fafc;
    --bg-2:         #f1f5f9;
    --white:        #ffffff;

    --warn:         #f59e0b;
    --warn-50:      #fffbeb;
    --danger:       #dc2626;
    --danger-50:    #fef2f2;
    --success:      #0f766e;

    --radius-sm:    8px;
    --radius:       12px;
    --radius-lg:    16px;
    --radius-xl:    22px;

    --shadow-xs:    0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm:    0 2px 8px rgba(15, 23, 42, .06);
    --shadow:       0 10px 30px rgba(15, 23, 42, .07);
    --shadow-lg:    0 24px 60px rgba(15, 23, 42, .12);

    --wrap:         1180px;
    --header-h:     66px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --mono: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font: 15px/1.75 var(--font);
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand); }
img { max-width: 100%; vertical-align: middle; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
code, pre { font-family: var(--mono); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt8 { margin-top: 8px; }   .mt16 { margin-top: 16px; }  .mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; } .mt48 { margin-top: 48px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ==========================================================================
   头部
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .inner {
    display: flex; align-items: center; gap: 32px;
    height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.brand .mark {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff; font-weight: 800; font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .3);
    /* flex 子项默认会收缩，站名过长时会压扁 logo；固定不可收缩 */
    flex: 0 0 auto;
}
.brand .name {
    font-size: 17px; font-weight: 700; letter-spacing: .2px;
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.brand .ver {
    font-size: 11px; font-weight: 600; color: var(--brand);
    background: var(--brand-50); border-radius: 6px; padding: 1px 6px; margin-left: 2px;
}

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav > a {
    padding: 8px 14px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; color: var(--ink-3); white-space: nowrap;
}
.main-nav > a:hover { background: var(--bg-2); color: var(--ink); }
.main-nav > a.is-active { color: var(--brand); background: var(--brand-50); font-weight: 600; }

.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-search {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-2); border-radius: 999px; padding: 0 6px 0 14px; height: 38px;
    border: 1px solid transparent; transition: .18s;
}
.header-search:focus-within { background: #fff; border-color: var(--brand-100); box-shadow: 0 0 0 3px var(--brand-ring); }
.header-search input { border: none; background: none; outline: none; width: 130px; font-size: 13.5px; }
.header-search button {
    width: 30px; height: 30px; border-radius: 50%; border: none;
    background: transparent; color: var(--muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}
.header-search button:hover { background: var(--brand); color: #fff; }

.nav-toggle {
    display: none; width: 38px; height: 38px; border: 1px solid var(--line);
    background: #fff; border-radius: 10px; cursor: pointer;
    align-items: center; justify-content: center;
}

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 40px; padding: 0 18px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap; transition: .18s;
}
.btn i, .btn svg { font-size: 15px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, .25); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-100); color: var(--brand); background: var(--brand-50); }
.btn-soft { background: var(--brand-50); color: var(--brand); }
.btn-soft:hover { background: var(--brand-100); color: var(--brand-dark); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* 用户菜单 */
.user-menu { position: relative; }
.user-menu .trigger {
    display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 6px;
    border-radius: 999px; border: 1px solid var(--line); background: #fff;
    cursor: pointer; font-size: 13.5px; font-weight: 600;
}
.user-menu .trigger:hover { border-color: var(--brand-100); }
.avatar {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; }
.user-menu .dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60;
}
.user-menu.open .dropdown { display: block; }
.user-menu .dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink-2);
}
.user-menu .dropdown a:hover { background: var(--bg-2); color: var(--brand); }
.user-menu .dropdown .sep { height: 1px; background: var(--line); margin: 5px 8px; }
.user-menu .dropdown .badge-dot {
    margin-left: auto; background: var(--danger); color: #fff; font-size: 11px;
    border-radius: 999px; padding: 0 6px; height: 17px; display: inline-flex; align-items: center;
}

/* 公告条 */
.notice-bar {
    background: linear-gradient(90deg, var(--brand-50), #f5f3ff);
    border-bottom: 1px solid var(--brand-100);
    font-size: 13.5px; color: var(--ink-3);
}
.notice-bar .wrap { display: flex; align-items: center; gap: 10px; height: 40px; }
.notice-bar .tag {
    background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 6px; flex-shrink: 0;
}
.notice-bar .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-bar .close { margin-left: auto; cursor: pointer; color: var(--muted-2); }

/* ==========================================================================
   通用区块
   ========================================================================== */
.section { padding: 68px 0; }
.section-sm { padding: 44px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -.4px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 15px; }
.section-head.left { text-align: left; }

.card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.card-pad { padding: 22px; }
.card-hover { transition: .22s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
    background: var(--bg-2); color: var(--ink-3);
}
.badge-brand { background: var(--brand-50); color: var(--brand); }
.badge-teal { background: var(--teal-50); color: var(--teal-dark); }
.badge-warn { background: var(--warn-50); color: #b45309; }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-lg { font-size: 13px; padding: 4px 12px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative; overflow: hidden;
    padding: 88px 0 76px;
    background:
        radial-gradient(1000px 420px at 15% -10%, #e0e7ff 0%, transparent 62%),
        radial-gradient(760px 380px at 88% 6%, #ccfbf1 0%, transparent 58%),
        #fff;
    border-bottom: 1px solid var(--line);
}
.hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(148, 163, 184, .12) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(148, 163, 184, .12) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(820px 380px at 50% 0%, #000 20%, transparent 78%);
    -webkit-mask-image: radial-gradient(820px 380px at 50% 0%, #000 20%, transparent 78%);
}
.hero .wrap { position: relative; z-index: 1; text-align: center; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--brand-100); color: var(--brand);
    font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
    box-shadow: var(--shadow-xs); margin-bottom: 22px;
}
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.hero h1 {
    font-size: 50px; line-height: 1.16; font-weight: 800; letter-spacing: -1.2px;
    max-width: 860px; margin: 0 auto 20px;
}
.hero h1 .grad {
    background: linear-gradient(100deg, var(--brand) 10%, var(--teal) 90%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
    font-size: 17px; color: var(--ink-3); max-width: 700px; margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
    margin-top: 30px; display: flex; gap: 30px; justify-content: center; flex-wrap: wrap;
    font-size: 13.5px; color: var(--muted);
}
.hero-meta b { color: var(--ink); font-size: 17px; font-weight: 700; display: block; }

/* ==========================================================================
   特性卡
   ========================================================================== */
.feature {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 24px; transition: .22s; height: 100%;
}
.feature:hover { border-color: var(--brand-100); box-shadow: var(--shadow); transform: translateY(-3px); }
.feature .ico {
    width: 44px; height: 44px; border-radius: 13px; margin-bottom: 16px;
    background: var(--brand-50); color: var(--brand);
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    flex: 0 0 auto;
}
.feature:nth-child(3n+2) .ico { background: var(--teal-50); color: var(--teal-dark); }
.feature:nth-child(3n) .ico { background: var(--warn-50); color: #b45309; }
.feature h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }

/* ==========================================================================
   应用卡片
   ========================================================================== */
.app-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }

.app-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; display: flex; flex-direction: column; transition: .22s;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.app-card .cover {
    height: 152px; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.app-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.app-card .cover .ph {
    font-size: 30px; font-weight: 800; color: rgba(255, 255, 255, .92);
    letter-spacing: 1px; text-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}
.app-card .cover .type {
    position: absolute; left: 12px; top: 12px;
    background: rgba(15, 23, 42, .55); color: #fff; backdrop-filter: blur(6px);
    font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px;
}
.app-card .cover .price {
    position: absolute; right: 12px; top: 12px;
    font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 7px;
    background: #fff; color: var(--brand);
}
.app-card .cover .price.free { background: var(--teal); color: #fff; }
.app-card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.app-card .body h3 {
    font-size: 15.5px; font-weight: 700; margin-bottom: 7px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card .body p {
    font-size: 13px; color: var(--muted); line-height: 1.7; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-card .meta {
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft);
    display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted-2);
}
.app-card .meta .star { color: var(--warn); font-weight: 700; }
.app-card .meta .right { margin-left: auto; }

/* 分类胶囊 */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
    background: #fff; border: 1px solid var(--line); color: var(--ink-3); cursor: pointer;
    transition: .16s;
}
.chip:hover { border-color: var(--brand-100); color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip .n { font-size: 11.5px; opacity: .7; }

.filter-bar {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 18px 20px; display: flex; flex-direction: column; gap: 14px;
}
.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row .label {
    font-size: 13px; font-weight: 600; color: var(--muted);
    flex-shrink: 0; min-width: 58px;
}

/* ==========================================================================
   详情页
   ========================================================================== */
.detail-hero {
    background: #fff; border-bottom: 1px solid var(--line); padding: 34px 0;
}
.detail-hero .inner { display: flex; gap: 26px; align-items: flex-start; }
.detail-hero .thumb {
    width: 108px; height: 108px; border-radius: var(--radius-lg); flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    color: rgba(255, 255, 255, .95); font-size: 30px; font-weight: 800;
}
.detail-hero .thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .info { flex: 1; min-width: 0; }
.detail-hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.detail-hero .sub { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.detail-hero .facts {
    display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--muted);
}
.detail-hero .facts b { color: var(--ink); font-weight: 700; }
.detail-hero .action { flex-shrink: 0; text-align: right; width: 220px; }
.detail-hero .price {
    font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.2;
}
.detail-hero .price.free { color: var(--teal-dark); }

.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.panel-head {
    padding: 16px 22px; border-bottom: 1px solid var(--line-soft);
    font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px;
}
.panel-head .count { font-size: 12.5px; color: var(--muted-2); font-weight: 500; }
.panel-body { padding: 22px; }

.side-list { display: flex; flex-direction: column; }
.side-list .item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 22px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.side-list .item:last-child { border-bottom: none; }
.side-list .item .k { color: var(--muted); width: 74px; flex-shrink: 0; }
.side-list .item .v { color: var(--ink-2); font-weight: 500; word-break: break-all; }

.version-item { padding: 16px 22px; border-bottom: 1px solid var(--line-soft); }
.version-item:last-child { border-bottom: none; }
.version-item .vh { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.version-item .vh strong { font-size: 14.5px; }
.version-item .log { font-size: 13px; color: var(--muted); white-space: pre-line; }

.review-item { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 14px; }
.review-item:last-child { border-bottom: none; }
.review-item .body { flex: 1; }
.review-item .top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-item .name { font-size: 13.5px; font-weight: 600; }
.review-item .stars { color: var(--warn); font-size: 12.5px; }
.review-item .time { font-size: 12px; color: var(--muted-2); margin-left: auto; }
.review-item .text { font-size: 13.5px; color: var(--ink-2); }
.review-item .reply {
    margin-top: 10px; background: var(--bg-2); border-radius: var(--radius);
    padding: 10px 14px; font-size: 13px; color: var(--ink-3);
}

/* Markdown 正文 */
.md { font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.md h1, .md h2, .md h3, .md h4 { color: var(--ink); font-weight: 700; line-height: 1.4; }
.md h1 { font-size: 26px; margin: 34px 0 14px; }
.md h2 { font-size: 21px; margin: 32px 0 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line-soft); }
.md h3 { font-size: 17px; margin: 26px 0 10px; }
.md h4 { font-size: 15.5px; margin: 20px 0 8px; }
.md > *:first-child { margin-top: 0; }
.md p { margin: 11px 0; }
.md a { color: var(--brand); border-bottom: 1px solid var(--brand-100); }
.md a:hover { border-color: var(--brand); }
.md ul, .md ol { margin: 11px 0 11px 6px; padding-left: 20px; }
.md ul.md-list { list-style: disc; }
.md ol.md-list { list-style: decimal; }
.md li { margin: 5px 0; }
.md blockquote.md-quote {
    border-left: 3px solid var(--brand-100); background: var(--brand-50);
    padding: 12px 18px; border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--ink-2); margin: 14px 0;
}
.md blockquote.md-quote p { margin: 4px 0; }
.md .md-code {
    background: var(--bg-2); color: #be185d; padding: 2px 7px;
    border-radius: 6px; font-size: 13px;
}
.md .md-pre {
    background: var(--ink); color: #e2e8f0; border-radius: var(--radius);
    padding: 16px 18px; overflow-x: auto; margin: 16px 0; font-size: 13px; line-height: 1.7;
}
.md .md-pre code { background: none; color: inherit; padding: 0; }
.md hr.md-hr { border: none; border-top: 1px solid var(--line); margin: 26px 0; }
.md .md-table-wrap { overflow-x: auto; margin: 16px 0; }
.md table.md-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md table.md-table th {
    background: var(--bg-2); font-weight: 600; color: var(--ink);
    padding: 10px 14px; text-align: left; border: 1px solid var(--line); white-space: nowrap;
}
.md table.md-table td { padding: 10px 14px; border: 1px solid var(--line); }
.md table.md-table tr:nth-child(even) td { background: #fcfdfe; }
.md img { border-radius: var(--radius); margin: 8px 0; }
.md img, .md .md-video { max-width: 100%; height: auto; }
.md .md-video { display: block; width: 100%; border-radius: var(--radius); margin: 12px 0; background: #000; }

/* 文档布局 */
.doc-layout { display: grid; grid-template-columns: 268px 1fr 200px; gap: 28px; align-items: start; }
.doc-side {
    position: sticky; top: calc(var(--header-h) + 20px);
    max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px;
}
.doc-side .grp { padding: 8px 6px; }
.doc-side .grp > h4 {
    font-size: 12px; font-weight: 700; color: var(--muted-2);
    text-transform: uppercase; letter-spacing: .6px; padding: 8px 12px 6px;
}
.doc-side a {
    display: block; padding: 7px 12px; border-radius: var(--radius-sm);
    font-size: 13.5px; color: var(--ink-3);
}
.doc-side a:hover { background: var(--bg-2); color: var(--ink); }
.doc-side a.is-active { background: var(--brand-50); color: var(--brand); font-weight: 600; }

.doc-toc {
    position: sticky; top: calc(var(--header-h) + 20px);
    font-size: 13px; border-left: 2px solid var(--line-soft); padding-left: 14px;
}
.doc-toc h4 { font-size: 12px; color: var(--muted-2); font-weight: 700; margin-bottom: 10px; letter-spacing: .6px; }
.doc-toc a { display: block; padding: 4px 0; color: var(--muted); line-height: 1.5; }
.doc-toc a:hover { color: var(--brand); }
.doc-toc a.lv3 { padding-left: 12px; font-size: 12.5px; }
.doc-toc a.is-current { color: var(--brand); font-weight: 600; }

.doc-nav { display: flex; gap: 16px; margin-top: 36px; }
.doc-nav a {
    flex: 1; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 14px 18px; font-size: 13.5px;
}
.doc-nav a:hover { border-color: var(--brand-100); }
.doc-nav a .dir { font-size: 12px; color: var(--muted-2); display: block; margin-bottom: 3px; }
.doc-nav a.next { text-align: right; }

/* ==========================================================================
   表单
   ========================================================================== */
.form-item { margin-bottom: 18px; }
.form-item > label {
    display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px;
}
.form-item > label .req { color: var(--danger); }
.form-item .hint { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }
.input, .select, .textarea {
    width: 100%; padding: 0 14px; height: 44px; border: 1px solid var(--line);
    border-radius: var(--radius); background: #fff; font-size: 14px; outline: none;
    transition: .16s;
}
.textarea { height: auto; padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--brand-light); box-shadow: 0 0 0 3px var(--brand-ring);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2394a3b8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* 批量截图上传（不限张数） */
/* 封面与大图上传（单图）：有图隐藏提示、按 16:10 展示、右上角删除
   遮罩 ::after 必须挂在 .preview 上，故 .preview 需 position:relative；
   否则 inset:0 会相对 .uploader 定位，悬浮时把「删除按钮 / 文件名」一并盖住。 */
.uploader.uploader-cover { padding: 0; overflow: hidden; }
.uploader.uploader-cover .preview { display: none; position: relative; margin: 0; line-height: 0; }
.uploader.uploader-cover .preview.has-img { display: block; }
.uploader.uploader-cover .preview img {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
    border-radius: 0; border: 0; margin: 0;
}
.uploader.uploader-cover .hint {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    min-height: 0; aspect-ratio: 16 / 10; margin: 0; padding: 16px;
}
.uploader.uploader-cover .hint i { font-size: 20px; }
.uploader.uploader-cover.has-file { padding: 0; border-style: solid; }
.uploader.uploader-cover.has-file .hint { display: none; }
/* 文件名提示浮在图片下方，不撑高容器、不被遮罩盖住 */
.uploader.uploader-cover.has-file .up-meta {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 6px 10px;
    background: linear-gradient(transparent, rgba(15, 23, 42, .55)); color: #fff;
    font-size: 12px; pointer-events: none;
}
.uploader.uploader-cover.has-file .preview::after {
    content: '\66f4\6362\56fe\7247'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .42); color: #fff; font-size: 13px; font-weight: 600;
    letter-spacing: 2px; opacity: 0; transition: .15s; pointer-events: none;
}
.uploader.uploader-cover.has-file:hover .preview::after { opacity: 1; }
.uploader.uploader-cover .up-del { z-index: 3; }
.uploader.uploader-cover .up-bar { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; border-radius: 0; z-index: 2; }
.uploader.uploader-cover:not(.has-file) .up-del { display: none !important; }

/* 批量截图上传（不限张数）：统一 16:10 卡片，空位与已传位等高 */
.shots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shots-grid .shot-item { min-height: 0; padding: 0; display: block; overflow: hidden; }
.shots-grid .shot-item .preview { margin: 0; width: 100%; display: block; position: relative; line-height: 0; }
.shots-grid .shot-item .preview:not(.has-img) { display: none; }
.shots-grid .shot-item .preview img {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
    border: 0; border-radius: 0; margin: 0;
}
.shots-grid .shot-item .hint {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    min-height: 0; aspect-ratio: 16 / 10; margin: 0; padding: 12px;
}
.shots-grid .shot-item .hint i { font-size: 18px; }
.shots-grid .shot-item.has-file .hint { display: none; }
.shots-grid .shot-item.has-file:hover .preview::after {
    content: '\66f4\6362'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .42); color: #fff; font-size: 13px; font-weight: 600;
    letter-spacing: 2px; pointer-events: none;
}
.shots-grid .shot-item .up-del { z-index: 3; }
.shots-grid .shot-item .up-bar { position: absolute; left: 0; right: 0; bottom: 0; width: auto; margin: 0; border-radius: 0; z-index: 2; }

/* 应用标识实时查重 */
.slug-check { position: relative; }
.slug-state { display: block; font-size: 12.5px; margin-top: 6px; min-height: 17px; }
.slug-state.checking { color: var(--muted-2); }
.slug-state.ok { color: #0f766e; }
.slug-state.err { color: var(--danger); }
.input.is-ok { border-color: #0f766e; }
.input.is-ok:focus { box-shadow: 0 0 0 3px rgba(15, 118, 110, .14); }
.input.is-err { border-color: var(--danger); }
.input.is-err:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }

.alert {
    padding: 13px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px;
    display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: var(--teal-50); color: var(--teal-dark); border: 1px solid #a7f3d0; }
.alert-error { background: var(--danger-50); color: #b91c1c; border: 1px solid #fecaca; }
.alert-warn { background: var(--warn-50); color: #b45309; border: 1px solid #fde68a; }
.alert-info { background: var(--brand-50); color: var(--brand-dark); border: 1px solid var(--brand-100); }

/* 支付方式 */
.pay-options { display: grid; gap: 12px; }
/* 提现方式选择 */
.wd-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.wd-method {
    display: flex; align-items: center; gap: 9px;
    border: 1.5px solid var(--line); border-radius: var(--radius); padding: 11px 18px;
    cursor: pointer; transition: .16s; background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-3);
}
.wd-method:hover { border-color: var(--brand-100); }
.wd-method input { display: none; }
.wd-method i { font-size: 17px; }
.wd-method.is-active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-50); }.pay-option {
    display: flex; align-items: center; gap: 14px;
    border: 1.5px solid var(--line); border-radius: var(--radius); padding: 15px 18px;
    cursor: pointer; transition: .16s; background: #fff;
}
.pay-option:hover { border-color: var(--brand-100); }
.pay-option input { display: none; }
.pay-option .radio {
    width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--line);
    flex-shrink: 0; position: relative; transition: .16s;
}
.pay-option .ico {
    width: 38px; height: 38px; border-radius: 10px; background: var(--bg-2);
    display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--ink-3);
    flex: 0 0 auto;
}
.pay-option .txt { flex: 1; }
.pay-option .txt strong { display: block; font-size: 14px; }
.pay-option .txt span { font-size: 12.5px; color: var(--muted-2); }
.pay-option.is-active { border-color: var(--brand); background: var(--brand-50); }
.pay-option.is-active .radio { border-color: var(--brand); }
.pay-option.is-active .radio::after {
    content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--brand);
}
.pay-option.is-active .ico { background: #fff; color: var(--brand); }

.pay-type-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-type-tab {
    display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px;
    border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
    cursor: pointer; font-size: 13.5px; font-weight: 600; transition: .16s;
}
.pay-type-tab:hover { border-color: var(--brand-100); }
.pay-type-tab.is-active { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }

.order-summary {
    background: var(--bg-2); border-radius: var(--radius-lg); padding: 22px;
}
.order-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.order-row .k { color: var(--muted); }
.order-row.total {
    border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 14px;
    font-size: 16px; font-weight: 700;
}
.order-row.total .v { color: var(--brand); font-size: 22px; }

/* ==========================================================================
   用户中心
   ========================================================================== */
.user-layout { display: grid; grid-template-columns: 224px 1fr; gap: 26px; align-items: start; }
.user-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px; }
.user-side .hd { padding: 16px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.user-side .hd .nm { font-weight: 700; font-size: 14.5px; }
.user-side .hd .rl { font-size: 12px; color: var(--muted-2); }
.user-side a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--ink-3);
}
.user-side a:hover { background: var(--bg-2); color: var(--brand); }
.user-side a.is-active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.user-side a .badge { margin-left: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.stat {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px;
}
.stat .v { font-size: 25px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.stat .k { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stat.brand .v { color: var(--brand); }
.stat.teal .v { color: var(--teal-dark); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted);
    padding: 12px 16px; background: var(--bg-2); white-space: nowrap;
}
.table th:first-child { border-radius: var(--radius) 0 0 0; }
.table th:last-child { border-radius: 0 var(--radius) 0 0; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fcfdfe; }
.table .actions { display: flex; gap: 8px; }

/* 空态 */
.empty {
    text-align: center; padding: 72px 24px; color: var(--muted);
}
.empty .ico {
    width: 66px; height: 66px; border-radius: 20px; background: var(--bg-2);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
    font-size: 27px; color: var(--muted-2);
    flex: 0 0 auto;
}
.empty h3 { font-size: 16px; color: var(--ink); margin-bottom: 7px; }
.empty p { font-size: 13.5px; margin-bottom: 20px; }

/* 提示条 */
.toast {
    position: fixed; top: 82px; left: 50%; transform: translateX(-50%) translateY(-12px);
    background: var(--ink); color: #fff; padding: 12px 22px; border-radius: var(--radius);
    font-size: 14px; box-shadow: var(--shadow-lg); z-index: 999; opacity: 0;
    transition: .25s; pointer-events: none; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--teal-dark); }
.toast.error { background: var(--danger); }

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 0; padding: 54px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: var(--muted); line-height: 1.85; max-width: 320px; }
.footer-col h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--muted); padding: 5px 0; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
    margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft);
    display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
    font-size: 13px; color: var(--muted-2);
}
.footer-bottom .links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }

/* ==========================================================================
   分页
   ========================================================================== */
.pg { margin-top: 36px; }
.pg-list { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; align-items: center; }
.pg-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3);
}
.pg-link:hover { border-color: var(--brand-100); color: var(--brand); }
.pg-link.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.pg-link.is-disabled { color: var(--muted-2); background: var(--bg-2); pointer-events: none; }
.pg-gap { color: var(--muted-2); }
.pg-info { font-size: 13px; color: var(--muted-2); margin-left: 10px; }

/* ==========================================================================
   其它
   ========================================================================== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-2); padding: 18px 0; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { color: var(--line); }

.article-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 40px 0 34px; }
.article-hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; line-height: 1.35; margin-bottom: 14px; }
.article-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

.blog-item {
    display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line-soft);
}
.blog-item:last-child { border-bottom: none; }
.blog-item .body { flex: 1; min-width: 0; }
.blog-item h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.45; }
.blog-item p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.blog-item .meta { margin-top: 12px; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted-2); }
.blog-item .date {
    width: 66px; flex-shrink: 0; text-align: center;
    background: var(--bg-2); border-radius: var(--radius); padding: 10px 0; height: fit-content;
}
.blog-item .date b { display: block; font-size: 21px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.blog-item .date span { font-size: 12px; color: var(--muted); }

.code-block {
    background: var(--ink); color: #e2e8f0; border-radius: var(--radius);
    padding: 16px 18px; overflow-x: auto; font-size: 13px; line-height: 1.7;
    position: relative;
}
.code-block pre { white-space: pre; }
.copy-btn {
    position: absolute; right: 10px; top: 10px; background: rgba(255, 255, 255, .12);
    color: #e2e8f0; border: none; border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, .22); }

.progress-line {
    height: 6px; background: var(--bg-2); border-radius: 999px; overflow: hidden;
}
.progress-line i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--teal)); border-radius: 999px; }

/* ==========================================================================
   结算 / 收银台 / 开发者中心
   ========================================================================== */
.page-h1 { font-size: 24px; font-weight: 800; color: var(--ink); margin: 0 0 18px; letter-spacing: -.4px; }

.checkout-layout { display: grid; grid-template-columns: 1fr 328px; gap: 24px; align-items: start; }
.checkout-layout > aside { position: sticky; top: calc(var(--header-h) + 20px); }

.buy-item { display: flex; align-items: center; gap: 16px; }
.buy-item .thumb {
    width: 64px; height: 64px; border-radius: 14px; flex-shrink: 0; overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--teal));
    color: #fff; font-weight: 800; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
}
.buy-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.buy-item .meta { flex: 1; min-width: 0; }
.buy-item .meta h3 { margin: 0 0 5px; font-size: 15.5px; }
.buy-item .price { font-size: 20px; font-weight: 800; color: var(--brand); white-space: nowrap; }

.cashier-head {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 22px 24px; margin-bottom: 22px;
}
.cashier-head .no { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.cashier-head .amt { font-size: 34px; font-weight: 800; color: var(--brand); letter-spacing: -1px; line-height: 1.15; margin-top: 6px; }
.countdown { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #b45309; background: var(--warn-50); border-radius: 999px; padding: 5px 13px; font-weight: 600; }

.qr-box {
    width: 240px; height: 240px; margin: 0 auto; border: 1px solid var(--line);
    border-radius: var(--radius-lg); background: #fff; padding: 10px;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
}
.qr-box img { width: 100%; height: 100%; display: block; border-radius: 8px; }
.qr-link {
    margin-top: 14px; padding: 11px 13px; background: var(--bg-2); border-radius: var(--radius);
    font-size: 12px; color: var(--muted); word-break: break-all; text-align: left;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.result-hero { text-align: center; padding: 46px 24px 10px; }
.result-hero .icon { font-size: 62px; margin-bottom: 16px; line-height: 1; }
.result-hero .icon.ok { color: var(--teal); }
.result-hero .icon.wait { color: #f59e0b; }
.result-hero .icon.fail { color: var(--danger); }
.result-hero h1 { font-size: 24px; margin: 0 0 8px; }
.result-hero p { color: var(--muted); margin: 0; }

.dev-banner {
    background: linear-gradient(120deg, #312e81, #4f46e5 55%, #0f766e);
    border-radius: var(--radius-lg); padding: 30px 32px; color: #fff;
    margin-bottom: 24px; position: relative; overflow: hidden;
}
.dev-banner h1 { margin: 0 0 8px; font-size: 23px; color: #fff; }
.dev-banner p { margin: 0; color: rgba(255, 255, 255, .84); font-size: 14px; max-width: 620px; }
.dev-banner .acts { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.dev-banner .btn-ghost { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.dev-banner .btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* 开发者主页（公开） */
.dev-hero { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.dev-hero .hero-avatar {
    width: 88px; height: 88px; border-radius: 24px; flex-shrink: 0; overflow: hidden;
    background: rgba(255, 255, 255, .18); border: 1.5px solid rgba(255, 255, 255, .34);
    display: flex; align-items: center; justify-content: center;
}
.dev-hero .hero-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dev-hero .hero-avatar .ini { font-size: 32px; font-weight: 800; color: #fff; }
.dev-hero .info { flex: 1; min-width: 240px; }
.dev-hero .name {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 24px; font-weight: 800; color: #fff; line-height: 1.3;
}
.dev-hero .name .badge { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .32); }
.dev-hero .sub { margin: 0; padding-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .74); }
.dev-hero .intro { margin: 12px 0 0; font-size: 14px; line-height: 1.7; color: rgba(255, 255, 255, .88); max-width: 680px; }
.dev-hero .chips { margin-top: 14px; }
.dev-hero .chips .chip { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.dev-hero .acts { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.dev-hero .acts .btn-ghost { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); color: #fff; }
.dev-hero .acts .btn-ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.dev-hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 12px; margin-top: 22px; }
.dev-hero-stats .s { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--radius); padding: 12px 14px; }
.dev-hero-stats .s .v { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.2; }
.dev-hero-stats .s .k { font-size: 12px; color: rgba(255, 255, 255, .76); margin-top: 3px; }

.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-opt {
    display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px;
    border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: .16s; background: #fff;
}
.type-opt:hover { border-color: var(--brand-100); }
.type-opt input { display: none; }
.type-opt .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-2); color: var(--ink-3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.type-opt strong { display: block; font-size: 14px; }
.type-opt span { font-size: 12.5px; color: var(--muted-2); }
.type-opt.is-active { border-color: var(--brand); background: var(--brand-50); }
.type-opt.is-active .ic { background: #fff; color: var(--brand); }

.uploader {
    border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--bg-2);
    padding: 16px; text-align: center; cursor: pointer; transition: .16s; position: relative;
}
.uploader:hover { border-color: var(--brand-100); }
.uploader.is-loading { opacity: .6; pointer-events: none; }
.uploader input[type=file] { display: none; }
.uploader .hint { font-size: 13px; color: var(--muted); }
.uploader .hint i { color: var(--brand); margin-right: 5px; }
.uploader .preview { margin-top: 12px; }
.uploader .preview.has-img { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.uploader .preview img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* 响应式 */
@media (max-width: 1080px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-layout > aside { position: static; }
    .doc-layout { grid-template-columns: 240px 1fr; }
    .doc-toc { display: none; }
    .detail-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .main-nav { display: none; }
    .nav-toggle { display: flex; }
    .header-search { display: none; }
    .hero { padding: 60px 0 52px; }
    .hero h1 { font-size: 34px; }
    .hero .lead { font-size: 15.5px; }
    .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .user-layout { grid-template-columns: 1fr; }
    .doc-layout { grid-template-columns: 1fr; }
    .doc-side { position: static; max-height: none; }
    .detail-hero .inner { flex-direction: column; }
    .detail-hero .action { width: 100%; text-align: left; }
    .form-grid { grid-template-columns: 1fr; }
    .app-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .section { padding: 44px 0; }
    .hero h1 { font-size: 28px; letter-spacing: -.6px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .app-grid { grid-template-columns: 1fr; }
    .section-head h2 { font-size: 23px; }
    .footer-grid { grid-template-columns: 1fr; }
    .blog-item .date { display: none; }
    .footer-bottom .links { margin-left: 0; }
    .detail-hero h1 { font-size: 21px; }
    /* 表单与上传：整宽单列 */
    .form-item > .input, .form-item > .select { max-width: none; }
    .shots-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
    /* 表格横向滚动 */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table th, .table td { padding: 9px 10px; font-size: 13px; }
    /* 详情页 / 结算 / 个人中心头部按钮整宽 */
    .user-layout .side { position: static; }
    .detail-hero .action .btn { width: 100%; justify-content: center; }
    .page-actions { flex-wrap: wrap; }
}
@media (max-width: 420px) {
    .wrap { padding: 0 13px; }
    .hero h1 { font-size: 24px; }
    .app-grid { grid-template-columns: 1fr; }
    .shots-grid { grid-template-columns: 1fr 1fr; }
    .btn { font-size: 13.5px; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   表单宽度收敛 / 列表自适应 / 上传组件增强（新增）
   ========================================================================== */

/* 单行输入不要过长 */
.form-item > .input,
.form-item > .select { max-width: 520px; }
.form-item > .input.is-short,
.form-item > .select.is-short { max-width: 200px; }
.form-grid .form-item > .input,
.form-grid .form-item > .select { max-width: none; }

/* 列表：按内容自适应宽高 */
.table { table-layout: auto; }
.table th { white-space: nowrap; }
.table td { white-space: normal; word-break: break-word; overflow-wrap: anywhere; }

/* 上传组件增强 */
.uploader { overflow: hidden; }
.uploader .up-meta { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; word-break: break-all; }
.uploader .up-del {
    position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%;
    border: 0; background: rgba(15, 23, 42, .55); color: #fff; cursor: pointer; display: none;
    align-items: center; justify-content: center; font-size: 12px; line-height: 1;
}
.uploader .up-del:hover { background: var(--danger); }
.uploader.has-file .up-del { display: inline-flex; }
.uploader.dragover { border-color: var(--brand); background: var(--brand-50); }
.uploader .up-bar { height: 5px; border-radius: 999px; background: var(--line); margin-top: 10px; overflow: hidden; display: none; }
.uploader.is-loading .up-bar { display: block; }
.uploader .up-bar > span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .15s; }
.uploader .up-tip { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }

/* ---------------- 安装包上传（拖拽式，去原生 file 控件） ----------------
   与后台同款：JS 隐藏原生 input、回显文件名与大小、支持拖拽。 */
.pkg-uploader {
    display: block; border: 1.5px dashed var(--line); border-radius: var(--radius);
    background: var(--bg-2); padding: 22px 16px; text-align: center; cursor: pointer;
    transition: .15s; position: relative; overflow: hidden;
}
.pkg-uploader:hover, .pkg-uploader.dragover { border-color: var(--brand); background: var(--brand-50, #eef2ff); }
.pkg-uploader input[type=file] { display: none; }
.pkg-uploader .pkg-ico {
    width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--teal)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.pkg-uploader .pkg-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.pkg-uploader .pkg-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.pkg-uploader .pkg-file { display: none; align-items: center; gap: 10px; text-align: left; }
.pkg-uploader.has-file .pkg-empty { display: none; }
.pkg-uploader.has-file .pkg-file { display: flex; }
.pkg-uploader .pkg-file .f-ico {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-50, #eef2ff);
    color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.pkg-uploader .pkg-file .f-name { font-size: 13.5px; font-weight: 600; color: var(--ink); word-break: break-all; }
.pkg-uploader .pkg-file .f-size { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.pkg-uploader .pkg-file .f-clear {
    flex: 0 0 auto; margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 0;
    background: rgba(15, 23, 42, .08); color: var(--muted-2); cursor: pointer; font-size: 12px;
}
.pkg-uploader .pkg-file .f-clear:hover { background: var(--danger); color: #fff; }

/* 安装包即时检测报告（选包后自动出结果）+ 包内标识一致性提示 */
.pkg-report {
    margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px;
    border: 1px solid var(--line); background: var(--bg-2);
}
.pkg-report.is-ok { border-color: #a7f3d0; background: var(--teal-50); }
.pkg-report.is-err { border-color: #fecaca; background: var(--danger-50); }
.pkg-report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pkg-report-list li { display: flex; gap: 7px; align-items: flex-start; line-height: 1.55; }
.pkg-report-list li.is-err { color: #b91c1c; }
.pkg-report-list li.is-warn { color: #b45309; }
.pkg-report-list li.is-ok { color: var(--teal-dark); }
.pkg-report-list li > i { margin-top: 3px; flex: 0 0 auto; }
.pkg-report-meta {
    margin: 9px 0 0; padding-top: 8px; border-top: 1px dashed var(--line);
    color: var(--muted); font-size: 12.5px; line-height: 1.6;
}
.pkg-consistency { margin: 8px 0 0; line-height: 1.6; }
.pkg-consistency.is-ok { color: var(--teal-dark); }
.pkg-consistency.is-err { color: var(--danger); }

/* 头像上传（个人资料页）：正方形预览 */
.uploader.uploader-avatar { padding: 12px; }
.uploader.uploader-avatar .preview img { width: 96px; height: 96px; border-radius: 24px; }
.uploader.uploader-avatar .preview.has-img { display: flex; justify-content: center; }

/* 版本历史表 */
.ver-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ver-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 9px 12px; background: var(--bg-2); white-space: nowrap; }
.ver-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; word-break: break-word; }
.ver-table tr:last-child td { border-bottom: 0; }
.ver-table .ver-tag { font-weight: 700; color: var(--brand); }

/* 收藏卡片：取消收藏按钮 */
.fav-item { position: relative; display: flex; flex-direction: column; }
.fav-item .fav-del {
    align-self: flex-start; margin-top: 8px; color: #b91c1c;
}
.fav-item .fav-del:hover { background: #fef2f2; }
