/* ==========================================================================
   前台样式
   安卓端：1:1 复刻 Google Play Store（Material You）
   苹果端：1:1 复刻 App Store（iOS 17/18）
   依赖 assets/css/tailwind.css（仅用少量工具类）
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
    /* Google Play */
    --gp-green: #01875f;
    --gp-green-press: #016b4c;
    --gp-green-soft: #e6f4ea;
    --gp-text: #1f1f1f;
    --gp-sub: #5f6368;
    --gp-hint: #80868b;
    --gp-line: #e8eaed;
    --gp-fill: #f1f3f4;
    /* App Store */
    --as-blue: #0071e3;
    --as-blue-press: #0058b0;
    --as-text: #1d1d1f;
    --as-sub: #6e6e73;
    --as-hint: #86868b;
    --as-line: rgba(0, 0, 0, .08);
    --as-fill: #f5f5f7;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }

.gp-body {
    font-family: "Google Sans", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--gp-text);
    background: #fff;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}
.as-body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
    color: var(--as-text);
    background: #fff;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) {
    .gp-body, .as-body { padding-bottom: 0; background: #f8f9fa; }
    .as-body { background: #fbfbfd; }
}

.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .45; display: inline-block; flex-shrink: 0; }

/* ---------- 星级 ---------- */
.stars { position: relative; display: inline-block; line-height: 1; white-space: nowrap; color: #dadce0; letter-spacing: 1px; font-size: 14px; }
.stars-bg { display: block; }
.stars-fg { position: absolute; left: 0; top: 0; overflow: hidden; width: var(--fill, 0%); color: #01875f; }
.stars-xs { font-size: 11px; letter-spacing: .5px; }
.stars-sm { font-size: 13px; }
.as-body .stars { color: #d2d2d7; }
.as-body .stars-fg { color: #ff9f0a; }

/* ---------- 通用：空状态 / 页脚 / 提示 ---------- */
.empty-state { text-align: center; padding: 56px 16px; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--gp-fill); color: #9aa0a6; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.as-body .empty-icon { background: var(--as-fill); color: #a1a1a6; }
.empty-title { font-size: 16px; color: var(--gp-text); margin: 0; font-weight: 500; }
.as-body .empty-title { color: var(--as-text); font-weight: 600; }
.empty-sub { font-size: 13px; margin: 8px 0 0; }
.empty-sub a { color: var(--gp-green); text-decoration: none; font-weight: 500; }
.as-body .empty-sub a { color: var(--as-blue); }
.detail-missing { padding: 24px 0; }

.site-footer { margin-top: 24px; padding: 20px 16px 24px; border-top: 1px solid var(--gp-line); text-align: center; font-size: 12px; color: var(--gp-sub); }
.as-body .site-footer { border-top-color: var(--as-line); color: var(--as-sub); }
.site-footer p { margin: 0; }
.site-footer-sub { margin-top: 8px !important; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.site-footer-sub a { color: inherit; text-decoration: none; }
.site-footer-sub a:hover { text-decoration: underline; }

.gp-tip, .as-risk { margin: 20px 4px 0; font-size: 12px; color: var(--gp-sub); line-height: 1.7; }
.as-risk { color: var(--as-hint); margin-left: 0; margin-right: 0; }

/* ==========================================================================
   PC 选择页
   ========================================================================== */
.portal-body {
    font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: radial-gradient(1200px 600px at 50% -10%, #e8f3ee 0%, #f6f8f7 55%);
    color: var(--gp-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}
.portal-wrap { width: 100%; max-width: 560px; }
.portal-head { text-align: center; margin-bottom: 26px; }
.portal-logo { height: 56px; width: auto; margin: 0 auto 12px; display: block; }
.portal-logo-mark { width: 60px; height: 60px; border-radius: 18px; background: #fff; box-shadow: 0 2px 10px rgba(60, 64, 67, .16); display: inline-flex; align-items: center; justify-content: center; }
.portal-title { font-size: 26px; font-weight: 700; margin: 14px 0 6px; letter-spacing: -.01em; }
.portal-tip { font-size: 15px; color: var(--gp-sub); margin: 0; }
.portal-detect { font-size: 13px; color: var(--gp-hint); margin: 10px 0 0; }
.portal-cards { display: grid; gap: 12px; }
.portal-card { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 22px; background: #fff; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(60, 64, 67, .16); transition: transform .16s ease, box-shadow .16s ease; }
.portal-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(60, 64, 67, .18); }
.portal-card:active { transform: scale(.99); }
.portal-card-icon { width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.portal-android .portal-card-icon { background: var(--gp-green-soft); color: var(--gp-green); }
.portal-ios .portal-card-icon { background: #e8f1fd; color: var(--as-blue); }
.portal-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-card-title { font-size: 18px; font-weight: 600; }
.portal-card-sub { font-size: 13px; color: var(--gp-sub); margin-top: 3px; }
.portal-card-arrow { font-size: 26px; color: #9aa0a6; line-height: 1; }
.portal-note { margin-top: 22px; background: #fff; border-radius: 20px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(60, 64, 67, .12); }
.portal-note h2 { font-size: 15px; margin: 0 0 8px; }
.portal-note ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--gp-sub); line-height: 1.9; }
.portal-foot { text-align: center; font-size: 12px; color: #9aa0a6; margin-top: 22px; }
.portal-foot p { margin: 0; }
.portal-foot-links { margin-top: 8px !important; }
.portal-foot-links a { color: var(--gp-sub); text-decoration: none; }
.portal-foot-links span { margin: 0 6px; }

/* ==========================================================================
   安卓端：Google Play Store
   ========================================================================== */

/* ---------- 顶栏：搜索胶囊 + 头像 ---------- */
.gp-topbar { position: sticky; top: 0; z-index: 40; background: #fff; }
.gp-topbar-inner { max-width: 1000px; margin: 0 auto; padding: 10px 16px 6px; display: flex; align-items: center; gap: 12px; }
.gp-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; background: var(--gp-fill); border-radius: 23px; transition: background .15s ease, box-shadow .15s ease; }
.gp-search:focus-within { background: #fff; box-shadow: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 12px rgba(60, 64, 67, .12); }
.gp-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--gp-text); font-family: inherit; }
.gp-search input::placeholder { color: var(--gp-sub); }
.gp-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gp-search-icon { color: var(--gp-sub); flex-shrink: 0; }
.gp-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff; font-size: 15px; font-weight: 600; background: linear-gradient(135deg, #34a853, #01875f); box-shadow: 0 1px 2px rgba(60, 64, 67, .2); }
.gp-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }

/* ---------- 分类胶囊（Play 的 filter chips） ---------- */
.gp-chips { max-width: 1000px; margin: 0 auto; padding: 6px 16px 10px; display: flex; gap: 8px; overflow-x: auto; }
.gp-chip { flex-shrink: 0; height: 32px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 8px; border: 1px solid #dadce0; background: #fff; font-size: 14px; color: #3c4043; text-decoration: none; white-space: nowrap; transition: background .14s ease, border-color .14s ease; }
.gp-chip:hover { background: #f8f9fa; }
.gp-chip.on { background: var(--gp-green-soft); border-color: var(--gp-green-soft); color: var(--gp-green); font-weight: 500; }

.gp-main { max-width: 1000px; margin: 0 auto; padding: 4px 16px 8px; }
@media (min-width: 900px) { .gp-main { background: #fff; padding: 8px 24px 16px; } }

/* ---------- 轮播：Play 精选大卡（图 + 底部应用条） ---------- */
.gp-hero { position: relative; }
.gp-hero-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 0 8px; }
.gp-hero-slide { flex: 0 0 100%; scroll-snap-align: center; display: block; border-radius: 24px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(60, 64, 67, .16); }
.gp-hero-art { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--gp-fill); overflow: hidden; }
.gp-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gp-hero-iconwrap { flex-shrink: 0; display: block; }
.gp-hero-text { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: block; }
.gp-hero-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 18px 14px; background: linear-gradient(to top, rgba(0, 0, 0, .62), rgba(0, 0, 0, 0)); color: #fff; }
.gp-hero-caption strong { display: block; font-size: 18px; font-weight: 600; line-height: 1.3; }
.gp-hero-caption span { display: block; font-size: 13px; opacity: .92; margin-top: 3px; }
.gp-hero-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; }
.gp-hero-icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--gp-fill); box-shadow: 0 1px 2px rgba(60, 64, 67, .18); }
.gp-hero-text { flex: 1; min-width: 0; }
.gp-hero-name { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-hero-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--gp-sub); margin-top: 2px; white-space: nowrap; overflow: hidden; }
.gp-hero-dots { display: flex; justify-content: center; gap: 6px; padding: 2px 0 4px; }
.gp-hero-dot { width: 6px; height: 6px; border-radius: 999px; background: #dadce0; border: 0; padding: 0; cursor: pointer; transition: width .2s ease, background .2s ease; }
.gp-hero-dot.on { background: var(--gp-green); width: 18px; }
@media (min-width: 900px) {
    .gp-hero-slide { flex: 0 0 72%; }
    .gp-hero-art { aspect-ratio: 21 / 9; }
}

/* ---------- 分组标题（Play：标题 + 箭头） ---------- */
.gp-shelf { margin-top: 22px; }
.gp-shelf-head { display: flex; align-items: center; margin: 0 0 12px; }
.gp-shelf-title { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.gp-shelf-title a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.gp-shelf-title a:hover { color: var(--gp-green); }
.gp-shelf-title svg { color: var(--gp-sub); }
.gp-shelf-scroll { display: flex; gap: 16px; overflow-x: auto; padding: 2px 2px 8px; }

/* 竖卡片（图标 + 名称 + 评分） */
.gp-card { flex: 0 0 96px; text-decoration: none; color: inherit; display: block; }
.gp-card-icon { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; background: var(--gp-fill); display: block; box-shadow: 0 1px 2px rgba(60, 64, 67, .2); transition: transform .14s ease, box-shadow .14s ease; }
.gp-card:hover .gp-card-icon { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(60, 64, 67, .2); }
.gp-card:active .gp-card-icon { transform: scale(.97); }
.gp-card-name { margin-top: 10px; font-size: 13px; line-height: 1.35; color: var(--gp-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.gp-card-meta { margin-top: 2px; font-size: 12px; color: var(--gp-sub); display: flex; align-items: center; gap: 3px; }

/* ---------- 列表行 ---------- */
.gp-list { display: block; }
.gp-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.gp-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.gp-row-icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex-shrink: 0; background: var(--gp-fill); box-shadow: 0 1px 2px rgba(60, 64, 67, .16); transition: transform .14s ease; }
.gp-row-main:active .gp-row-icon { transform: scale(.96); }
.gp-row-text { min-width: 0; flex: 1; }
.gp-row-name { font-size: 15px; font-weight: 500; color: var(--gp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-row-dev { font-size: 12.5px; color: var(--gp-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.gp-row-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gp-sub); margin-top: 4px; white-space: nowrap; overflow: hidden; }
.gp-row-desc { font-size: 12.5px; color: var(--gp-sub); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gp-row-btn { flex-shrink: 0; height: 32px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--gp-green); color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; transition: background .15s ease, transform .12s ease; }
.gp-row-btn:hover { background: var(--gp-green-press); }
.gp-row-btn:active { transform: scale(.96); }

/* 榜单行（左侧大号名次） */
.gp-rank { flex-shrink: 0; width: 26px; text-align: center; font-size: 18px; font-weight: 500; color: var(--gp-sub); }
.gp-rank.top { color: var(--gp-green); }

.gp-more { text-align: center; margin: 18px 0 4px; }
.gp-more-btn { display: inline-block; padding: 9px 26px; border: 1px solid #dadce0; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--gp-green); text-decoration: none; }
.gp-more-btn:hover { background: #f6faf8; }

/* ---------- 详情页 ---------- */
.gp-nav { display: flex; align-items: center; gap: 8px; height: 48px; }
.gp-nav-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--gp-sub); text-decoration: none; flex-shrink: 0; }
.gp-nav-btn:hover { background: var(--gp-fill); color: var(--gp-text); }
.gp-nav-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gp-app-head { display: flex; gap: 18px; align-items: center; margin-top: 6px; }
.gp-app-icon { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; flex-shrink: 0; background: var(--gp-fill); box-shadow: 0 2px 6px rgba(60, 64, 67, .2); }
.gp-app-headtext { min-width: 0; }
.gp-app-name { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.gp-app-dev { font-size: 14px; color: var(--gp-green); margin: 4px 0 0; font-weight: 500; }
.gp-app-sub { font-size: 13px; color: var(--gp-sub); margin: 4px 0 0; }

.gp-stats { display: flex; align-items: stretch; margin: 20px 0 18px; }
.gp-stat { flex: 1; text-align: center; padding: 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-right: 1px solid var(--gp-line); }
.gp-stat:last-child { border-right: 0; }
.gp-stat-val { font-size: 18px; font-weight: 600; line-height: 1.2; }
.gp-stat-size { font-size: 15px; line-height: 1.5; }
.gp-stat-label { font-size: 12px; color: var(--gp-sub); }

.gp-cta { margin: 0 0 18px; }
.gp-install-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border-radius: 24px; background: var(--gp-green); color: #fff; font-size: 16px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; transition: background .15s ease, transform .12s ease; }
.gp-install-btn:hover { background: var(--gp-green-press); }
.gp-install-btn:active { transform: scale(.985); }
.gp-install-btn.disabled, .gp-install-btn:disabled { background: var(--gp-fill); color: var(--gp-sub); cursor: not-allowed; }
.gp-cta-note { text-align: center; font-size: 12px; color: var(--gp-sub); margin: 10px 0 0; line-height: 1.6; }

.gp-shots { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; margin: 20px 0 6px; }
.gp-shot { height: 300px; width: auto; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--gp-fill); box-shadow: 0 1px 3px rgba(60, 64, 67, .16); cursor: zoom-in; }
@media (min-width: 900px) { .gp-shot { height: 380px; } }

.gp-block { margin-top: 26px; }
.gp-block-title { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
.gp-desc { font-size: 14px; line-height: 1.75; color: #3c4043; max-height: 5.4em; overflow: hidden; position: relative; }
.gp-desc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2em; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.gp-desc.open { max-height: none; }
.gp-desc.open::after { display: none; }
.gp-desc-empty { font-size: 14px; color: var(--gp-sub); margin: 0; }
.gp-desc-toggle { margin-top: 8px; background: none; border: 0; padding: 0; font-size: 14px; font-weight: 500; color: var(--gp-green); cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; }

.gp-version-line { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--gp-sub); }
.gp-version { font-weight: 600; color: var(--gp-text); }
.gp-changelog { font-size: 14px; line-height: 1.75; margin-top: 6px; color: #3c4043; }

.gp-info { margin: 0; }
.gp-info > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--gp-line); font-size: 14px; }
.gp-info > div:last-child { border-bottom: 0; }
.gp-info dt { color: var(--gp-sub); flex-shrink: 0; }
.gp-info dd { margin: 0; text-align: right; max-width: 66%; word-break: break-all; color: var(--gp-text); }

.gp-perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gp-perms li { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #3c4043; }
.gp-perms svg { color: var(--gp-sub); flex-shrink: 0; }

/* ---------- 底部导航 ---------- */
.gp-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--gp-line); display: flex; height: 60px; padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; }
.gp-tabitem { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--gp-sub); text-decoration: none; }
.gp-tabitem.on { color: var(--gp-green); }
@media (min-width: 900px) { .gp-tabbar { display: none; } }

/* ==========================================================================
   苹果端：App Store
   ========================================================================== */

/* ---------- 顶栏 ---------- */
.as-topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--as-line); }
.as-topbar-inner { max-width: 980px; margin: 0 auto; height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 8px; }
.as-back { display: inline-flex; align-items: center; gap: 2px; color: var(--as-blue); font-size: 16px; text-decoration: none; flex-shrink: 0; margin-left: -6px; padding: 4px 6px 4px 0; }
.as-back span { margin-left: -2px; }
.as-top-title { flex: 1; min-width: 0; text-align: center; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s ease; }
.as-top-title:empty { display: none; }
/* 有大标题的页面（今天 / 列表）：滚动后大标题收起，顶栏标题淡入 —— App Store 的行为 */
.as-body.has-large .as-top-title { opacity: 0; }
.as-body.has-large.as-scrolled .as-top-title { opacity: 1; }
.as-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; margin-left: auto; background: linear-gradient(135deg, #a1c4fd, #c2e9fb); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.as-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.as-top-title:not(:empty) + .as-avatar { margin-left: 0; }
.as-search { max-width: 948px; margin: 0 auto 10px; height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .05); border-radius: 10px; }
.as-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--as-text); font-family: inherit; }
.as-search input::placeholder { color: var(--as-hint); }

.as-main { max-width: 980px; margin: 0 auto; padding: 4px 16px 8px; }
@media (min-width: 900px) { .as-main { background: #fff; padding: 8px 24px 16px; } }

.as-largetitle { padding: 10px 0 16px; }
.as-largetitle-date { font-size: 13px; font-weight: 600; color: var(--as-sub); letter-spacing: .04em; margin: 0; }
.as-largetitle h1 { font-size: 34px; font-weight: 800; letter-spacing: -.022em; margin: 2px 0 0; line-height: 1.15; }

/* ---------- 今日卡片 ---------- */
.as-today-scroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 12px; }
.as-today-card { flex: 0 0 84%; max-width: 460px; scroll-snap-align: center; border-radius: 22px; overflow: hidden; background: #fff; text-decoration: none; color: inherit; display: flex; flex-direction: column; box-shadow: 0 4px 22px rgba(0, 0, 0, .09); transition: transform .18s ease; }
.as-today-card:hover { transform: translateY(-2px); }
.as-today-card:active { transform: scale(.99); }
.as-today-link { display: block; text-decoration: none; color: inherit; }
.as-today-text { padding: 20px 20px 14px; }
.as-today-iconwrap { flex-shrink: 0; display: block; }
.as-today-bartext { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: block; }
.as-today-kicker { font-size: 12px; font-weight: 700; color: var(--as-blue); letter-spacing: .06em; margin: 0; text-transform: uppercase; }
.as-today-title { font-size: 24px; font-weight: 700; line-height: 1.24; margin: 6px 0 0; letter-spacing: -.015em; }
.as-today-sub { font-size: 15px; color: var(--as-sub); margin: 6px 0 0; line-height: 1.45; }
.as-today-art { aspect-ratio: 16 / 10; background: var(--as-fill); overflow: hidden; }
.as-today-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-today-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; }
.as-today-icon { width: 44px; height: 44px; border-radius: 22.5%; object-fit: cover; flex-shrink: 0; background: var(--as-fill); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.as-today-bartext { flex: 1; min-width: 0; }
.as-today-barname { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-today-barsub { font-size: 13px; color: var(--as-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* ---------- 分组 ---------- */
.as-shelf { margin-top: 28px; }
.as-shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.as-shelf-title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.015em; }
.as-shelf-more { font-size: 15px; color: var(--as-blue); text-decoration: none; white-space: nowrap; }
.as-shelf-more:hover { text-decoration: underline; }
.as-shelf-scroll { display: flex; gap: 18px; overflow-x: auto; padding: 2px 2px 10px; }

.as-tile { flex: 0 0 100px; text-decoration: none; color: inherit; display: block; }
.as-tile-icon { width: 100px; height: 100px; border-radius: 22.5%; object-fit: cover; display: block; background: var(--as-fill); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); transition: transform .16s ease; }
.as-tile:hover .as-tile-icon { transform: scale(1.04); }
.as-tile:active .as-tile-icon { transform: scale(.97); }
.as-tile-name { margin-top: 9px; font-size: 13px; font-weight: 500; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.64em; }
.as-tile-sub { font-size: 12px; color: var(--as-sub); margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 列表行 ---------- */
.as-list { display: block; }
.as-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--as-line); }
.as-row:last-child { border-bottom: 0; }
.as-row-main { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.as-row-icon { width: 64px; height: 64px; border-radius: 22.5%; object-fit: cover; flex-shrink: 0; background: var(--as-fill); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); transition: transform .16s ease; }
.as-row-main:active .as-row-icon { transform: scale(.96); }
.as-row-text { min-width: 0; flex: 1; }
.as-row-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-row-sub { font-size: 13px; color: var(--as-sub); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.as-row-meta { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--as-sub); margin-top: 3px; }
.as-get { flex-shrink: 0; height: 30px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; background: var(--as-blue); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: transform .12s ease, background .15s ease; }
.as-get:hover { background: var(--as-blue-press); }
.as-get:active { transform: scale(.95); }

/* ---------- 教程卡片（Apple 分组内嵌样式） ---------- */
.as-guide-card { background: var(--as-fill); border-radius: 18px; padding: 18px; margin-top: 28px; }
.as-guide-card h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.as-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.as-steps li { display: flex; gap: 10px; align-items: flex-start; }
.as-step-no { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--as-blue); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.as-step-text { font-size: 14px; line-height: 1.62; }
.as-guide-tip { font-size: 12px; color: var(--as-sub); margin: 14px 0 0; line-height: 1.65; }

/* ---------- 详情页 ---------- */
.as-app-head { display: flex; gap: 18px; align-items: center; margin-top: 12px; }
.as-app-icon { width: 112px; height: 112px; border-radius: 22.5%; object-fit: cover; flex-shrink: 0; background: var(--as-fill); box-shadow: 0 3px 12px rgba(0, 0, 0, .16); }
.as-app-headtext { min-width: 0; }
.as-app-name { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -.015em; }
.as-app-sub { font-size: 15px; color: var(--as-sub); margin: 4px 0 0; line-height: 1.4; }
.as-app-dev { font-size: 15px; color: var(--as-blue); margin: 6px 0 0; }

.as-stats { display: flex; padding: 16px 0; margin: 20px 0 4px; border-top: 1px solid var(--as-line); border-bottom: 1px solid var(--as-line); }
.as-stat { flex: 1; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 8px; border-right: 1px solid var(--as-line); }
.as-stat:last-child { border-right: 0; }
.as-stat-val { font-size: 18px; font-weight: 600; }
.as-stat-label { font-size: 12px; color: var(--as-sub); }

.as-cta { margin: 18px 0 6px; }
.as-get-big { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border-radius: 14px; background: var(--as-blue); color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; transition: transform .12s ease, background .15s ease; }
.as-get-big:hover { background: var(--as-blue-press); }
.as-get-big:active { transform: scale(.985); }
.as-cta-note { text-align: center; font-size: 12px; color: var(--as-sub); margin: 10px 0 0; }

.as-shots { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; margin: 22px 0 6px; }
.as-shot { height: 300px; width: auto; border-radius: 20px; object-fit: cover; flex-shrink: 0; background: var(--as-fill); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); cursor: zoom-in; }
@media (min-width: 900px) { .as-shot { height: 400px; } }

.as-block { margin-top: 28px; }
.as-block-title { font-size: 22px; font-weight: 700; margin: 0 0 10px; letter-spacing: -.015em; }
.as-desc { font-size: 15px; line-height: 1.68; color: var(--as-text); max-height: 5.1em; overflow: hidden; position: relative; }
.as-desc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2em; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff); pointer-events: none; }
.as-desc.open { max-height: none; }
.as-desc.open::after { display: none; }
.as-desc-toggle { margin-top: 8px; background: none; border: 0; padding: 0; font-size: 15px; font-weight: 500; color: var(--as-blue); cursor: pointer; font-family: inherit; }

.as-version-line { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--as-sub); }
.as-version { font-weight: 600; color: var(--as-text); }
.as-changelog { font-size: 15px; line-height: 1.68; margin-top: 8px; }

.as-info { margin: 0; }
.as-info > div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--as-line); font-size: 15px; }
.as-info > div:last-child { border-bottom: 0; }
.as-info dt { color: var(--as-sub); flex-shrink: 0; }
.as-info dd { margin: 0; text-align: right; max-width: 66%; word-break: break-all; }

/* ---------- 底部标签栏 ---------- */
.as-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--as-line); display: flex; height: 52px; padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; }
.as-tabitem { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: #8e8e93; text-decoration: none; }
.as-tabitem.on { color: var(--as-blue); }
@media (min-width: 900px) { .as-tabbar { display: none; } }

/* ==========================================================================
   列表页公共
   ========================================================================== */
.list-head { padding: 12px 0 4px; }
.list-title { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.as-body .list-title { font-size: 30px; font-weight: 800; letter-spacing: -.022em; }
.list-count { font-size: 13px; color: var(--gp-sub); margin: 4px 0 0; }
.as-body .list-count { color: var(--as-sub); font-size: 14px; }

/* 苹果端分类胶囊（App Store 样式） */
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 12px 2px 10px; }
.chip { flex-shrink: 0; height: 36px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--as-fill); font-size: 15px; color: var(--as-text); text-decoration: none; white-space: nowrap; }
.chip.on { background: var(--as-blue); color: #fff; font-weight: 600; }

.sort-row { display: flex; gap: 20px; padding: 10px 0 0; border-bottom: 1px solid var(--gp-line); margin: 6px 0 6px; }
.as-body .sort-row { border-bottom-color: var(--as-line); }
.sort-tab { font-size: 14px; color: var(--gp-sub); text-decoration: none; padding: 8px 0 10px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.sort-tab.on { color: var(--gp-green); border-bottom-color: var(--gp-green); font-weight: 600; }
.as-body .sort-tab { color: var(--as-sub); }
.as-body .sort-tab.on { color: var(--as-blue); border-bottom-color: var(--as-blue); }

.load-more { text-align: center; padding: 20px 0 6px; }
.load-more-btn { padding: 10px 30px; border-radius: 999px; border: 1px solid #dadce0; background: #fff; font-size: 14px; font-weight: 500; color: var(--gp-green); cursor: pointer; font-family: inherit; }
.as-body .load-more-btn { color: var(--as-blue); border-color: rgba(0, 0, 0, .14); }
.load-more-btn:disabled { opacity: .5; cursor: default; }
.load-more-loading { display: none; font-size: 13px; color: var(--gp-sub); }
.load-more.loading .load-more-btn { display: none; }
.load-more.loading .load-more-loading { display: inline; }
.load-more.done { display: none; }
.scroll-sentinel { height: 2px; }

/* ==========================================================================
   安装引导浮层 / 截图预览 / Toast
   ========================================================================== */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .42); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .18s ease; }
.sheet-backdrop[hidden] { display: none; }
.sheet { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); position: relative; animation: slideUp .26s cubic-bezier(.2, .8, .2, 1); }
.sheet::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .16); margin: 0 auto 14px; }
@media (min-width: 640px) {
    .sheet-backdrop { align-items: center; padding: 24px; }
    .sheet { border-radius: 22px; max-height: 84vh; padding-top: 22px; }
    .sheet::before { display: none; }
}
.sheet-close { position: absolute; top: 18px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--as-fill); border: 0; color: var(--as-sub); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-head { display: flex; gap: 12px; align-items: center; padding-right: 38px; }
.sheet-icon { width: 52px; height: 52px; border-radius: 22.5%; object-fit: cover; flex-shrink: 0; background: var(--as-fill); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.sheet-head h3 { font-size: 17px; font-weight: 700; margin: 0; }
.sheet-head p { font-size: 13px; color: var(--as-sub); margin: 2px 0 0; }
.sheet-alert { margin-top: 14px; background: #eef6ff; color: #0b4a8f; border-radius: 12px; padding: 11px 13px; font-size: 13px; line-height: 1.65; }
.sheet-alert-warn { background: #fff4e5; color: #8a5300; }
.sheet-download { margin-top: 12px; }
.sheet-status { margin: 10px 0 0; font-size: 13px; color: #0b6b48; background: #e6f4ea; border-radius: 10px; padding: 10px 12px; line-height: 1.6; }
.sheet-steps { margin-top: 18px; }
.sheet-ipa { display: block; margin-top: 16px; text-align: center; font-size: 13px; color: var(--as-blue); }
.sheet-tip { font-size: 12px; color: var(--as-sub); margin: 12px 0 0; line-height: 1.65; }
.sheet-risk { font-size: 12px; color: var(--as-hint); margin: 8px 0 0; line-height: 1.65; }

.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }

.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: rgba(0, 0, 0, .84); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 80; max-width: 86%; text-align: center; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
