/* ============================================================
   易云储 v5.6 移动端重排 public/mobile.css（百度网盘风格）
   同一份 HTML、同一套功能，只按宽度重排；桌面 ≥921px 完全不生效。
   注意：本文件必须在主题样式（app.css）之后加载。
   ============================================================ */

/* ---------- 主重排：≤920px 启用 ---------- */
@media (max-width: 920px) {

    /* ===== 全局基调 ===== */
    body { background: #f5f6fa; }
    body, button, input, label, a, .fcard, .icon-btn, .toolbar button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* ===== 顶栏：两行 + 全宽搜索 ===== */
    .topbar {
        padding: 10px 14px;
        padding-top: calc(10px + env(safe-area-inset-top));
        border-radius: 0 0 18px 18px;
    }
    .topbar-row1 { display: flex; align-items: center; gap: 10px; }
    .topbar-row1 .brand { font-size: 17px; }
    .topbar-row1 .icon-btn { padding: 10px 14px; min-height: 44px; border-radius: 10px; }
    .topbar-row2 { margin-top: 10px; max-width: none; }
    .topbar-row2 input {
        width: 100%; min-height: 42px;
        background: rgba(255,255,255,.92); border: none; border-radius: 10px;
        font-size: 16px; padding: 8px 14px;
    }

    /* ⚙ 工具抽屉：整齐 3 列宫格 */
    .tools-drawer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px 12px; margin-top: 10px; }
    .tools-drawer button, .tools-drawer label, .tools-drawer a {
        white-space: nowrap;
        min-height: 40px; padding: 8px 4px; font-size: 13px;
        background: rgba(255,255,255,.16); border-radius: 10px;
        text-align: center; display: flex; align-items: center; justify-content: center;
        overflow: hidden; text-overflow: ellipsis;
    }

    /* ===== 主区 ===== */
    .main { padding: 14px 12px calc(88px + env(safe-area-inset-bottom)); }

    /* 公告：单行 + 小圆角卡片 */
    .notice {
        white-space: normal; overflow: visible; text-overflow: clip;
        font-size: 13px; line-height: 1.55; padding: 10px 14px; border-radius: 12px;
        background: #fff; color: #8a6d1a; box-shadow: 0 1px 4px rgba(30,40,90,.04);
    }

    /* 上传条：48px 细横条，点击选择文件上传 */
    .upload-strip {
        height: 48px; font-size: 14px; font-weight: 500;
        border: none; border-radius: 12px;
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0); color: #fff;
        box-shadow: 0 4px 12px rgba(79, 110, 242, .3);
    }
    .upload-strip:active { transform: scale(.98); filter: brightness(.95); }

    /* 分类：横向滚动单行胶囊，紧凑省空间，一屏见全部 */
    .toolbar {
        display: flex; gap: 8px; overflow-x: auto;
        -webkit-overflow-scrolling: touch; scrollbar-width: none;
        padding: 2px; margin: 0 -2px 12px;
    }
    .toolbar::-webkit-scrollbar { display: none; }
    .toolbar button {
        flex: 0 0 auto; min-height: 40px; padding: 8px 15px;
        border: none; border-radius: 999px; background: #fff; color: #4a5568;
        box-shadow: 0 1px 4px rgba(30,40,90,.05);
        display: inline-flex; flex-direction: row; align-items: center; gap: 6px;
    }
    .toolbar .t-ico { font-size: 16px; line-height: 1; font-style: normal; }
    .toolbar .t-txt { font-size: 13px; line-height: 1; }
    .toolbar button.active { background: #4f6ef2; color: #fff; box-shadow: 0 4px 12px rgba(79, 110, 242, .3); }
    .toolbar button.active .t-txt { font-weight: 600; }

    /* ===== 触感：统一按压回弹 ===== */
    .toolbar button, .tools-drawer button, .tools-drawer label, .tools-drawer a,
    .bottom-nav a, .bottom-nav label, .upload-strip, .icon-btn, .fcard .ops button, .fcard .ops a {
        transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
        will-change: transform;
    }
    .toolbar button:active, .tools-drawer button:active, .tools-drawer label:active,
    .tools-drawer a:active, .bottom-nav a:active, .bottom-nav label:active,
    .upload-strip:active, .icon-btn:active {
        transform: scale(.93);
        background: #eef1ff; color: #4f6ef2;
    }
    .fcard { transition: transform .12s ease, background .15s ease, box-shadow .15s ease; }
    .fcard:active { transform: scale(.98); background: #f6f7ff; }
    .fcard .ops button:active, .fcard .ops a:active { transform: scale(.9); background: #eef1ff; color: #4f6ef2; }

    /* 底部导航：选中项加浅色胶囊底 */
    .bottom-nav a, .bottom-nav label { border-radius: 12px; }
    .bottom-nav .active { background: #eef1ff; }

    /* ===== 文件列表：百度网盘式单列大行 ===== */
    .grid { grid-template-columns: 1fr; gap: 8px; }
    .fcard {
        flex-direction: row; align-items: center; flex-wrap: wrap;
        padding: 12px 14px; border-radius: 14px;
        box-shadow: 0 1px 6px rgba(30, 40, 90, .05);
        transition: transform .15s ease, box-shadow .15s ease;
    }
    .fcard:active { transform: scale(.985); box-shadow: 0 1px 3px rgba(30, 40, 90, .08); }
    .fcard input.sel { order: 3; transform: scale(1.1); margin-left: 8px; }
    .fcard .name {
        order: 1; flex: 1 1 auto; min-width: 0;
        font-size: 15px; -webkit-line-clamp: 1;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .fcard .meta { order: 2; flex-basis: 100%; margin-top: 3px; font-size: 12px; }
    /* 操作默认收起，点「⋯」展开（桌面不受影响） */
    .fcard .ops {
        order: 4; flex-basis: 100%;
        display: none; margin-top: 10px; padding-top: 10px;
        border-top: 1px solid #f0f2f7;
    }
    .fcard.ops-open .ops { display: flex; }
    .fcard .ops button, .fcard .ops a {
        flex: 1; text-align: center;
        min-height: 40px; padding: 8px 6px; font-size: 13px;
        border: none; border-radius: 10px; background: #f5f6fa; color: #4f6ef2;
    }
    .fcard .ops button:active, .fcard .ops a:active { background: #e8ebff; transform: scale(.96); }
    /* 「⋯」更多按钮（JS 在手机端注入） */
    .fcard .more-btn {
        order: 5; flex: 0 0 auto; margin-left: 8px;
        width: 44px; height: 44px; border: none; border-radius: 10px;
        background: transparent; color: #98a1b3; font-size: 22px; line-height: 1;
    }
    .fcard .more-btn:active { background: #f0f2ff; }

    /* ===== 手机底部导航 ===== */
    .bottom-nav {
        display: flex;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
        background: #fff; border-top: 1px solid #eef1f7;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -2px 12px rgba(30, 40, 90, .06);
    }
    .bottom-nav a, .bottom-nav label {
        flex: 1; min-height: 52px;
        display: flex; align-items: center; justify-content: center;
        font-size: 13px; color: #4a5568; text-decoration: none; cursor: pointer;
    }
    .bottom-nav .active { color: #4f6ef2; font-weight: 600; }
    .bottom-nav a:active, .bottom-nav label:active { background: #f0f2ff; }

    .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

    /* ===== 通用页面（登录/注册/安装/后台/大厅/分享/收集）===== */
    .page-narrow {
        align-items: flex-start;
        background: #f5f6fa; padding: 0 0 40px;
        min-height: 100vh;
    }
    .page-narrow .card {
        max-width: 640px; margin: 0 auto;
        background: transparent; box-shadow: none; border-radius: 0;
        padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    }
    .page-narrow h1 {
        font-size: 22px; text-align: left; margin: 8px 0 20px;
        padding-left: 12px; border-left: 4px solid #4f6ef2;
    }
    .page-narrow h3 { font-size: 16px; margin: 24px 0 10px; }
    .page-narrow input[type="text"], .page-narrow input[type="password"], .page-narrow input[type="search"] {
        min-height: 48px; margin-bottom: 12px;
        background: #fff; border: 1px solid #eef1f7; border-radius: 12px;
        font-size: 16px; padding: 12px 16px;
        box-shadow: 0 1px 4px rgba(30,40,90,.04);
    }
    .page-narrow input:focus { border-color: #4f6ef2; background: #fff; }
    .page-narrow button, .btn {
        min-height: 48px; border-radius: 12px; font-size: 16px; font-weight: 500;
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
        box-shadow: 0 4px 12px rgba(79, 110, 242, .3);
    }
    .btn.ghost { background: #fff; color: #4f6ef2; border: 1px solid #dfe4f2; box-shadow: none; }
    .btn-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 16px 0; }
    .tip { margin-top: 18px; line-height: 1.7; }
    .addr { border-radius: 14px; padding: 16px; }
    .addr pre { font-size: 12px; }
    .log { line-height: 1.9; }

    /* 后台统计：两格大卡 */
    .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stats div { border-radius: 14px; padding: 16px; }
    .stats b { font-size: 24px; }

    /* 表格：横向滚动顺滑 */
    .table-wrap { -webkit-overflow-scrolling: touch; scrollbar-width: none; border-radius: 12px; background: #fff; }
    .table-wrap table { min-width: 480px; }

    /* 大厅：消息气泡化 */
    .lobby-list { max-height: none; }
    .lobby-item {
        background: #fff; border-radius: 14px; padding: 12px 14px;
        margin-bottom: 8px; border-bottom: none;
        box-shadow: 0 1px 4px rgba(30,40,90,.04);
    }
    .lobby-item p { font-size: 15px; line-height: 1.6; }
    .send-row { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); }
    .send-row input { min-height: 46px; background: #fff; border: 1px solid #eef1f7; border-radius: 12px; font-size: 16px; }
    .send-row button { min-height: 46px; padding: 0 24px; border-radius: 12px; }

    /* 收集/分享页的文件选择框 */
    .page-narrow input[type="file"] {
        width: 100%; min-height: 48px; margin-bottom: 12px;
        background: #fff; border: 1px dashed #c9d2f0; border-radius: 12px; padding: 12px;
    }
}

/* ---------- 收紧：≤639px ---------- */
@media (max-width: 639px) {
    .topbar-row1 .brand { font-size: 16px; }
    .topbar-row1 .icon-btn { padding: 9px 11px; font-size: 12px; }
    .fcard { padding: 11px 12px; }
    .fcard .name { font-size: 14px; }
    .page-narrow .card { padding: 16px 12px; }
    .btn-row { grid-template-columns: 1fr; }
    .addr pre { font-size: 11px; }
}

/* ---------- 极窄屏：≤379px ---------- */
@media (max-width: 379px) {
    .topbar-row1 { gap: 6px; }
    .topbar-row1 .brand { font-size: 15px; }
    .topbar-row1 .icon-btn { padding: 8px 9px; font-size: 11px; }
    .fcard .ops button, .fcard .ops a { font-size: 12px; padding: 7px 4px; }
    .toolbar button { padding: 7px 14px; font-size: 12px; }
    .bottom-nav a, .bottom-nav label { font-size: 12px; }
}

/* ---------- 横屏（矮视口） ---------- */
@media (orientation: landscape) and (max-height: 520px) {
    .topbar { position: static; border-radius: 0; }
    .topbar-row2 { margin-top: 6px; }
    .page-narrow { align-items: center; padding-top: 12px; }
    .page-narrow .card { max-height: calc(100vh - 24px); overflow-y: auto; }
    .bottom-nav { display: none; }
}

/* ---------- 打印 ---------- */
@media print {
    .topbar, .toolbar, .upload-strip, .tools-drawer, .toast, .fcard .ops, .bottom-nav { display: none !important; }
    body { background: #fff; }
    .main { max-width: none; padding: 0; }
    .fcard { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    .toast { transition: none; }
    .ripple { display: none; }
}

/* ---------- v6：深色模式移动端适配 ---------- */
html[data-theme="dark"] body,
html[data-theme="dark"] .page-narrow { background: #12141c; color: #d7dbe6; }
html[data-theme="dark"] .page-narrow .card { background: #1c1f2b; border-color: #2a2e3d; }
html[data-theme="dark"] .page-narrow h1, html[data-theme="dark"] .page-narrow h3 { color: #e8ebf5; }
html[data-theme="dark"] .page-narrow input[type="text"],
html[data-theme="dark"] .page-narrow input[type="password"],
html[data-theme="dark"] .page-narrow input[type="search"] { background: #232736; border-color: #333850; color: #d7dbe6; }
html[data-theme="dark"] .bottom-nav a:active, html[data-theme="dark"] .bottom-nav label:active { background: #232736; }
html[data-theme="dark"] .fcard button, html[data-theme="dark"] .fcard .ops a { background: #232736; color: #c3c9da; }

/* ---------- v6：灯箱移动端 ---------- */
.lightbox { padding: 10px; }
.lightbox-inner iframe { width: 94vw; height: 70vh; }

/* ---------- v8：深色模式下的触感配色 ---------- */
html[data-theme="dark"] .toolbar button.active { background: #26305a; color: #8fa0ff; box-shadow: inset 0 0 0 1.5px #4f6ef2; }
html[data-theme="dark"] .toolbar button:active,
html[data-theme="dark"] .tools-drawer button:active,
html[data-theme="dark"] .tools-drawer label:active,
html[data-theme="dark"] .tools-drawer a:active,
html[data-theme="dark"] .bottom-nav a:active,
html[data-theme="dark"] .bottom-nav label:active,
html[data-theme="dark"] .upload-strip:active,
html[data-theme="dark"] .icon-btn:active { background: #26305a; color: #8fa0ff; }
html[data-theme="dark"] .fcard:active { background: #232736; }
html[data-theme="dark"] .fcard .ops button:active,
html[data-theme="dark"] .fcard .ops a:active { background: #26305a; color: #8fa0ff; }
html[data-theme="dark"] .bottom-nav .active { background: #26305a; }

/* ===== v9 手机端：缩略图小方块 / 骨架屏 / 排序按钮 / 进度条 ===== */
.fcard .thumb {
    order: 0; flex: 0 0 auto;
    margin: 0 10px 0 0; border-radius: 10px;
    width: 52px; height: 52px; aspect-ratio: auto;
}
.fcard .thumb .thumb-fallback { font-size: 24px; }
.fcard.skeleton { flex-wrap: wrap; }
.fcard.skeleton .sk-thumb {
    order: 0; flex: 0 0 auto; margin: 0 10px 0 0;
    width: 52px; height: 52px; border-radius: 10px;
}
.fcard.skeleton .sk-line { order: 1; flex: 1 1 100%; height: 14px; margin: 2px 0; }
.fcard.skeleton .sk-line.w70 { width: 60%; }
.fcard.skeleton .sk-line.w45 { width: 40%; }
.sort-btn { padding: 7px 13px; min-height: 36px; }
.upload-progress { bottom: calc(70px + env(safe-area-inset-bottom, 0px) + 8px); }
@media (prefers-reduced-motion: reduce) {
    .pull-indicator { transition: none; }
    .fcard.skeleton .sk-thumb, .fcard.skeleton .sk-line { animation: none; }
}

/* ===== v10 手机端视觉打磨 ===== */
@media (max-width: 920px) {

    /* 字体渲染更细腻 */
    body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

    /* 顶栏毛玻璃：半透明渐变 + 模糊，滚动时内容隐约透出 */
    .topbar {
        background: linear-gradient(135deg, rgba(79,110,242,.94), rgba(122,92,240,.94));
        -webkit-backdrop-filter: saturate(1.4) blur(14px);
        backdrop-filter: saturate(1.4) blur(14px);
        box-shadow: 0 2px 16px rgba(79, 110, 242, .18);
    }

    /* 底部导航毛玻璃 */
    .bottom-nav {
        background: rgba(255,255,255,.86);
        -webkit-backdrop-filter: saturate(1.4) blur(16px);
        backdrop-filter: saturate(1.4) blur(16px);
        border-top: 1px solid rgba(220,226,240,.6);
        box-shadow: 0 -4px 20px rgba(30, 40, 90, .08);
    }

    /* 列表入场：卡片依次淡入上移，节奏感 */
    .fcard { animation: cardIn .32s cubic-bezier(.2,.8,.3,1) backwards; }
    .fcard:nth-child(1) { animation-delay: .02s; }
    .fcard:nth-child(2) { animation-delay: .05s; }
    .fcard:nth-child(3) { animation-delay: .08s; }
    .fcard:nth-child(4) { animation-delay: .11s; }
    .fcard:nth-child(5) { animation-delay: .14s; }
    .fcard:nth-child(6) { animation-delay: .17s; }
    .fcard:nth-child(n+7) { animation-delay: .2s; }
    .fcard.skeleton { animation: none; }
    @keyframes cardIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* 空状态：大图标 + 引导文案 */
    .empty { padding: 56px 0 40px; }
    .empty .empty-ico {
        font-size: 52px; line-height: 1; margin-bottom: 14px;
        filter: grayscale(.2); opacity: .85;
        animation: emptyFloat 2.6s ease-in-out infinite;
    }
    .empty .empty-ico svg { width: 60px; height: 60px; color: #a5aec2; filter: none; opacity: 1; }
    .empty .empty-text { font-size: 14px; color: #a5aec2; }
    @keyframes emptyFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }

    /* Toast：深色胶囊 + 模糊，更醒目 */
    .toast {
        background: rgba(32, 36, 52, .92); color: #fff;
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        border-radius: 999px; padding: 11px 22px;
        font-size: 14px; box-shadow: 0 8px 24px rgba(15, 18, 30, .3);
    }

    /* 分类选中态：图标轻放大，胶囊保持高亮渐变 */
    .toolbar button.active .t-ico { transform: scale(1.12); transition: transform .18s ease; }
    .toolbar button.active {
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
    }

    /* 上传条与主按钮：渐变更柔和、阴影更透气 */
    .upload-strip, .page-narrow button, .btn {
        background: linear-gradient(135deg, #4f6ef2 0%, #7a5cf0 100%);
        box-shadow: 0 6px 18px rgba(79, 110, 242, .28);
    }

    /* 灯箱：关闭按钮固定底部居中，拇指好按 */
    .lightbox { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
    .lightbox-close {
        position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%;
        transform: translateX(-50%);
        min-width: 120px; min-height: 44px;
        background: rgba(255,255,255,.2);
        -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        font-size: 15px;
    }
    .lightbox-inner img, .lightbox-inner video { border-radius: 14px; }

    /* 页面卡片标题与正文间距节奏 */
    .page-narrow h1 { letter-spacing: .5px; }
    .page-narrow .tip { color: #8a94a6; font-size: 13px; }

    /* 横向滚动区隐藏滚动条 */
    .table-wrap::-webkit-scrollbar, .toolbar::-webkit-scrollbar { display: none; }
}

/* ===== v10 深色模式补全 ===== */
html[data-theme="dark"] .topbar {
    background: linear-gradient(135deg, rgba(38,48,90,.94), rgba(52,42,96,.94));
    box-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .bottom-nav {
    background: rgba(24, 27, 40, .88);
    border-top-color: rgba(60, 66, 92, .5);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .35);
}
html[data-theme="dark"] .notice { background: #2b2413; color: #d4b96a; box-shadow: none; }
html[data-theme="dark"] .lobby-item { background: #1c1f2b; box-shadow: none; }
html[data-theme="dark"] .stats div { background: #1c1f2b; }
html[data-theme="dark"] .table-wrap { background: #1c1f2b; }
html[data-theme="dark"] .send-row input { background: #232736; border-color: #333850; color: #d7dbe6; }
html[data-theme="dark"] .empty .empty-text { color: #6a7389; }
html[data-theme="dark"] .toast { background: rgba(58, 64, 88, .95); }
html[data-theme="dark"] .fcard .ops { border-top-color: #262b3d; }
html[data-theme="dark"] .fcard .more-btn { color: #6a7389; }
html[data-theme="dark"] .fcard .more-btn:active { background: #26305a; }
html[data-theme="dark"] .upload-progress { box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
html[data-theme="dark"] .sort-btn { background: #232736; }

/* ===== v10 减少动效补全 ===== */
@media (prefers-reduced-motion: reduce) {
    .fcard, .empty .empty-ico { animation: none !important; }
}

/* ===== v11 手机端：个人中心 + 后台适配 ===== */
@media (max-width: 920px) {
    .profile-card { padding: 18px 16px; border-radius: 14px; }
    .profile-avatar { width: 54px; height: 54px; font-size: 23px; }
    .menu-item { min-height: 50px; padding: 14px 14px; }
    .menu-item:active { background: #eef1ff; }
    .panel-card { border-radius: 20px 20px 0 0; }
    .panel-btn:active { transform: scale(.98); }
    .share-ops button { min-height: 38px; }
    .checkin-grid { grid-template-columns: repeat(4, 1fr); }
    .admin-tabs button { min-height: 42px; padding: 9px 15px; }
    .admin-tabs button:active { transform: scale(.95); }
    .row-more, .row-del { min-height: 38px; padding: 6px 12px; }
    .stats .wide { grid-column: span 2; }
    html[data-theme="dark"] .menu-item:active { background: #26305a; }
}

/* ===== v12 手机端：面板化交互适配 ===== */
@media (max-width: 920px) {
    /* 列表头：面包屑可换行，按钮不挤 */
    .list-head { flex-wrap: wrap; }
    .list-head .crumbs { flex: 1 1 100%; order: 3; margin-top: 6px; font-size: 12px; }
    .list-head-right { order: 2; margin-left: auto; }

    /* 文件夹/图标头：手机端 52px 小方块，与缩略图一致 */
    .fcard .thumb.thumb-folder, .fcard .thumb.thumb-plain {
        order: 0; flex: 0 0 auto;
        margin: 0 10px 0 0; border-radius: 10px;
        width: 52px; height: 52px; aspect-ratio: auto; font-size: 24px;
    }

    /* 面板：圆角更大、底部安全区 */
    .panel-card { border-radius: 20px 20px 0 0; }
    .pick-list { max-height: 56vh; }
    .pick-item { min-height: 50px; border-radius: 12px; }
    .pick-item:active { background: #eef1ff; }
    .seg button { min-height: 46px; border-radius: 12px; }
    .seg button:active { transform: scale(.96); }
    .panel-btn:active { transform: scale(.98); }

    /* 灯箱切换按钮：拇指可及 */
    .lb-nav { width: 44px; height: 60px; }

    /* 清空回收站按钮 */
    .sort-btn.danger-btn { min-height: 36px; }
    html[data-theme="dark"] .pick-item:active { background: #26305a; }
}

/* ===== v13 手机端：防撑宽 + 视觉打磨 ===== */
@media (max-width: 920px) {
    /* 任何超长内容都不再把页面撑宽、触发浏览器缩放 */
    html, body { overflow-x: hidden; max-width: 100vw; }
    .main, .page-narrow { max-width: 100vw; overflow-x: hidden; }

    /* 卡片：更大圆角 + 更柔和阴影 */
    .fcard { border-radius: 16px; box-shadow: 0 2px 10px rgba(30, 40, 90, .06); overflow: hidden; }
    .fcard:active { box-shadow: 0 1px 4px rgba(30, 40, 90, .08); }

    /* 面包屑单行省略，不参与撑宽 */
    .list-head .crumbs { max-width: 100%; }

    /* 操作按钮：触控热区更大、按压反馈更明显 */
    .fcard .ops button, .fcard .ops a {
        min-height: 42px; border-radius: 11px; font-weight: 500;
    }
    .fcard .ops button:active, .fcard .ops a:active {
        transform: scale(.92); background: #4f6ef2; color: #fff;
    }
    .icon-btn, .sort-btn, .more-btn { min-height: 40px; }
    .share-dl:active { transform: scale(.97); }

    /* 面板标题过长省略 */
    .panel-head > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ===== v14 手机端补充 ===== */
@media (max-width: 920px) {
    /* 认证页：装饰圆缩小、品牌标题居中（覆盖 h1 左边线样式） */
    .auth-page::before { width: 260px; height: 260px; }
    .auth-page::after { width: 220px; height: 220px; }
    .auth-brand h1 { border-left: none; padding-left: 0; text-align: center; }
    .auth-logo { width: 58px; height: 58px; font-size: 27px; }
    /* 列表图标随缩略图缩小 */
    .fcard .thumb.thumb-plain svg, .fcard .thumb.thumb-folder svg,
    .fcard .thumb .thumb-fallback svg { width: 24px; height: 24px; }
}
html[data-theme="dark"] .empty .empty-ico svg { color: #4a5470; }
html[data-theme="dark"] .fcard { box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }

/* ===== v16 手机端：个人中心 + 大厅 ===== */
@media (max-width: 920px) {
    .pf-hero { padding: 22px 16px 20px; border-radius: 16px; }
    .pf-avatar { width: 64px; height: 64px; font-size: 27px; }
    .pf-nick { font-size: 18px; }
    .pf-stats { gap: 8px; }
    .pf-stat { padding: 12px 6px; border-radius: 12px; }
    .pf-stat b { font-size: 15px; }
    .lb-list { max-height: none; }
    .lb-send { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); background: transparent; }
    .lb-send input { min-height: 46px; background: #fff; border: 1px solid #eef1f7; border-radius: 12px; font-size: 16px; }
    .lb-send button { min-height: 46px; padding: 0 24px; border-radius: 12px; }
    .lb-bubble { max-width: 80%; }
}
html[data-theme="dark"] .lb-send input { background: #232736; border-color: #333850; color: #d7dbe6; }

/* ===== v17 手机端：欢迎横幅 + 最近文件 ===== */
@media (max-width: 920px) {
    .hero-welcome { padding: 18px 16px; border-radius: 14px; }
    .hw-greet { font-size: 18px; }
    .hw-actions { width: 100%; }
    .hw-btn { padding: 8px 14px; font-size: 13px; }
    .rs-card { flex: 0 0 112px; padding: 8px; }
    .rs-thumb { width: 96px; height: 64px; }
}

/* ===== v18 手机端：底部导航美化（图标+文字上下排列，上传凸起圆钮） ===== */
@media (max-width: 920px) {
    /* 覆盖旧版横排文字样式：改为图标在上、文字在下的纵向布局 */
    .bottom-nav a, .bottom-nav label {
        background: transparent;
        flex-direction: column; gap: 2px;
        min-height: 56px; padding-top: 6px;
        font-size: 11px; color: #8a93a8;
        transition: color .18s ease, transform .18s ease;
    }
    .bottom-nav a:active, .bottom-nav label:active { background: transparent; transform: scale(.9); }

    .bn-ico { font-size: 20px; line-height: 1; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
    .bn-txt { font-size: 11px; letter-spacing: .3px; }

    /* 当前页：文字品牌色，图标换上渐变圆角块 + 弹跳 */
    .bottom-nav .active { color: #4f6ef2; background: transparent; font-weight: 600; }
    .bottom-nav .active .bn-ico {
        display: flex; align-items: center; justify-content: center;
        width: 34px; height: 26px; border-radius: 12px;
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
        color: #fff; font-size: 15px;
        box-shadow: 0 4px 12px rgba(79, 110, 242, .35);
        animation: bnPop .35s cubic-bezier(.34,1.56,.64,1);
    }
    @keyframes bnPop {
        0% { transform: scale(.6); }
        60% { transform: scale(1.12); }
        100% { transform: scale(1); }
    }

    /* 上传：中央凸起渐变圆钮 */
    .bn-upload { position: relative; }
    .bn-upload .bn-up-ico {
        display: flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; margin-top: -18px; margin-bottom: 2px;
        border-radius: 50%;
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
        color: #fff; font-size: 19px;
        border: 3px solid #fff;
        box-shadow: 0 6px 16px rgba(79, 110, 242, .4);
        transition: transform .2s cubic-bezier(.34,1.56,.64,1);
    }
    .bn-upload:active .bn-up-ico { transform: scale(.88) translateY(-2px); }
    .bn-upload .bn-txt { color: #8a93a8; }

    /* 深色模式变体 */
    html[data-theme="dark"] .bottom-nav a, html[data-theme="dark"] .bottom-nav label { color: #8a93a8; }
    html[data-theme="dark"] .bottom-nav .active { color: #8fa0ff; background: transparent; }
    html[data-theme="dark"] .bottom-nav .active .bn-ico {
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
        box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
    }
    html[data-theme="dark"] .bn-upload .bn-up-ico {
        border-color: #1c1f2b;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .55);
    }
    html[data-theme="dark"] .bn-upload .bn-txt { color: #8a93a8; }

    @media (prefers-reduced-motion: reduce) {
        .bottom-nav .active .bn-ico { animation: none; }
    }
}

/* ===== v19 手机端：管理后台适配 + 全局细节 ===== */
@media (max-width: 920px) {
    /* 大厅页：内容列撑满整行（覆盖 page-narrow 的 flex-start 收缩） */
    .page-narrow.lb-page { align-items: stretch; }

    /* 页面进入淡入上移 */
    .main, .page-narrow .card { animation: pageIn .28s ease backwards; }
    @keyframes pageIn {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: none; }
    }

    /* 管理后台：标签横滑胶囊 */
    .admin-tabs {
        display: flex; gap: 8px; overflow-x: auto;
        padding: 4px 2px 10px; scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .admin-tabs::-webkit-scrollbar { display: none; }
    .admin-tabs button {
        flex: 0 0 auto; min-height: 40px; padding: 8px 16px;
        border-radius: 999px; background: #fff; color: #4a5568;
        font-size: 14px; box-shadow: 0 1px 4px rgba(30, 40, 90, .06);
        transition: transform .18s ease;
    }
    .admin-tabs button:active { transform: scale(.94); }
    .admin-tabs button.active {
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0); color: #fff;
        box-shadow: 0 4px 12px rgba(79, 110, 242, .3);
    }

    /* 概览统计卡：左侧彩色渐变条 + 渐变数字 */
    .stats div { position: relative; overflow: hidden; }
    .stats div::before {
        content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
        background: linear-gradient(180deg, #4f6ef2, #7a5cf0);
        border-radius: 0 4px 4px 0;
    }
    .stats div:nth-child(2)::before { background: linear-gradient(180deg, #22b07d, #4fd6a8); }
    .stats div:nth-child(3)::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }
    .stats div:nth-child(4)::before { background: linear-gradient(180deg, #ef4444, #f87171); }
    .stats div.wide::before { background: linear-gradient(180deg, #7a5cf0, #a78bfa); }
    .stats b {
        background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
        -webkit-background-clip: text; background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    /* 后台搜索框与表格 */
    .admin-pane input[type="search"] {
        min-height: 44px; margin-bottom: 10px;
        background: #fff; border: 1px solid #eef1f7; border-radius: 12px;
        padding: 0 14px; font-size: 15px;
    }
    .table-wrap th, .table-wrap td { padding: 10px 8px; font-size: 13px; }
    .row-more, .row-del { border-radius: 10px; }

    /* 深色变体 */
    html[data-theme="dark"] .admin-tabs button { background: #232736; color: #c3c9da; }
    html[data-theme="dark"] .admin-pane input[type="search"] { background: #232736; border-color: #333850; color: #d7dbe6; }
}
@media (prefers-reduced-motion: reduce) {
    .main, .page-narrow .card { animation: none !important; }
}

/* ===== v20 手机端：布局清理 + 按压反馈增强 ===== */
@media (max-width: 920px) {
    /* 最近文件：卡片不再被长文件名撑宽 */
    .rs-card { min-width: 0; }
    .rs-name { max-width: 100%; }

    /* 大厅头部：干净卡片，去掉标题左边线 */
    .lb-head {
        background: #fff; border-radius: 14px; padding: 12px 14px;
        margin: 12px 0 10px; box-shadow: 0 1px 4px rgba(30, 40, 90, .05);
    }
    .lb-head h1 { border-left: none; padding-left: 0; margin: 0; font-size: 18px; }
    .lb-head .icon-btn { min-width: 40px; }

    /* 公告条更轻量 */
    .notice { padding: 10px 14px; border-radius: 12px; font-size: 13px; }

    /* 按压反馈：卡片与按钮轻微缩放，手指按下有"陷下去"的感觉 */
    .fcard { transition: transform .15s ease, box-shadow .15s ease; }
    .fcard:active { transform: scale(.98); }
    .toolbar button { transition: transform .15s ease; }
    .toolbar button:active { transform: scale(.9); }
    .hw-btn:active { transform: scale(.93); }
    .rs-card:active { transform: scale(.95); }
    .menu-item:active { transform: scale(.985); }
    .upload-strip:active { transform: scale(.985); }
    .notice, .lb-head, .profile-card, .pf-hero, .stats div { transition: transform .15s ease; }

    html[data-theme="dark"] .lb-head { background: #1c1f2b; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
    .fcard, .toolbar button, .hw-btn, .rs-card, .menu-item, .upload-strip { transition: none !important; }
}

/* ===== v21 手机端：视图切换 + 卡片动效 + 存储环 + 细节打磨 ===== */

/* 存储用量环形进度：conic-gradient 按百分比变量着色 */
.ps-ring {
    --p: 0;
    width: clamp(104px, 30vw, 132px);
    aspect-ratio: 1;
    margin: 6px auto 10px;
    border-radius: 50%;
    background: conic-gradient(#4f6ef2 calc(var(--p) * 1%), #eef1f7 0);
    display: grid;
    place-items: center;
    position: relative;
}
.ps-ring::before {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 1px 4px rgba(30, 40, 90, .06);
}
.ps-ring b {
    position: relative;
    font-size: clamp(17px, 5vw, 21px);
    background: linear-gradient(135deg, #4f6ef2, #7a5cf0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ps-ring + .ps-row { margin-top: 2px; }
html[data-theme="dark"] .ps-ring { background: conic-gradient(#6d86ff calc(var(--p) * 1%), #2a2e3d 0); }
html[data-theme="dark"] .ps-ring::before { background: #1c1f2b; }

/* 回到顶部悬浮按钮：毛玻璃圆钮 */
.to-top {
    position: fixed;
    right: 14px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 14px rgba(30, 40, 90, .18);
    color: #4f6ef2;
    font-size: 18px;
    line-height: 1;
}
html[data-theme="dark"] .to-top { background: rgba(35, 39, 54, .78); color: #8fa3ff; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }

/* 骨架屏流光：加载占位有呼吸感 */
.fcard.skeleton .sk-thumb,
.fcard.skeleton .sk-line {
    background: linear-gradient(90deg, #eef1f7 25%, #f8fafc 37%, #eef1f7 63%);
    background-size: 400% 100%;
    animation: skShimmer 1.3s ease infinite;
}
@keyframes skShimmer {
    from { background-position: 100% 0; }
    to { background-position: 0 0; }
}
html[data-theme="dark"] .fcard.skeleton .sk-thumb,
html[data-theme="dark"] .fcard.skeleton .sk-line {
    background: linear-gradient(90deg, #232736 25%, #2e3448 37%, #232736 63%);
    background-size: 400% 100%;
}

@media (max-width: 920px) {
    /* 卡片入场：按 --i 序号逐个错开淡入上移（最多错开 8 张） */
    .fcard {
        animation: cardIn .32s ease backwards;
        animation-delay: calc(min(var(--i, 0), 8) * 45ms);
    }
    @keyframes cardIn {
        from { opacity: 0; transform: translateY(10px) scale(.98); }
        to { opacity: 1; transform: none; }
    }

    /* 收藏角标：右上角金色小星 */
    .fcard { position: relative; }
    .star-badge {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 2;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .92);
        color: #f59e0b;
        display: grid;
        place-items: center;
        font-size: 13px;
        box-shadow: 0 1px 4px rgba(30, 40, 90, .15);
    }
    html[data-theme="dark"] .star-badge { background: rgba(28, 31, 43, .9); }

    /* 勾选高亮：:has() 选中即整卡描边 */
    .fcard:has(.sel:checked) {
        box-shadow: 0 0 0 2px rgba(79, 110, 242, .55), 0 4px 14px rgba(79, 110, 242, .18);
    }

    /* 列表视图：单列横向卡片，缩略图居左信息居右 */
    .grid.list-mode { grid-template-columns: 1fr; gap: 10px; }
    .grid.list-mode .fcard {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        grid-template-areas:
            'thumb name'
            'thumb meta'
            'ops   ops';
        gap: 2px 12px;
        align-items: center;
        padding: 10px 12px;
    }
    .grid.list-mode .fcard .thumb { grid-area: thumb; width: 52px; height: 52px; border-radius: 12px; }
    .grid.list-mode .fcard .name { grid-area: name; }
    .grid.list-mode .fcard .meta { grid-area: meta; }
    .grid.list-mode .fcard .ops { grid-area: ops; margin-top: 6px; }
    .grid.list-mode .fcard .sel { position: absolute; top: 10px; left: 10px; z-index: 3; margin: 0; }
    .grid.list-mode .fcard .more-btn { position: absolute; top: 8px; right: 8px; }
    .grid.list-mode .fcard .star-badge { top: 8px; right: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .fcard { animation: none !important; }
    .fcard.skeleton .sk-thumb, .fcard.skeleton .sk-line { animation: none !important; }
}

/* ===== v22 手机端：短链接面板 ===== */
.short-name {
    font-size: 13px;
    color: #4a5468;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
html[data-theme="dark"] .short-name { color: #c3c9da; }

/* ===== v23：后台最近动态与操作面板手机适配 ===== */
.recent-list .rc-meta { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-card .panel-btn { padding: 13px 16px; font-size: 15px; }

/* ===== v24：后台手机端适配 ===== */
.stats-v24 div { padding: 10px 12px; }
.stats-v24 .st-ico { flex-basis: 34px; width: 34px; height: 34px; font-size: 16px; }
.stats-v24 b { font-size: 17px; }
.up-meta { grid-template-columns: repeat(4, 1fr); }
.panel-card { max-height: 82vh; overflow-y: auto; }

/* ===== v25：登录注册手机适配 ===== */
.auth-wrap { padding: 22px 0; }
.auth-card { padding: 26px 20px 18px; border-radius: 18px; }
.auth-logo { width: 54px; height: 54px; font-size: 26px; border-radius: 17px; }
.field input { font-size: 16px; } /* 防 iOS 聚焦缩放 */

/* ===== v27：首页布局收敛（手机端） ===== */
/* 顶栏浅色化：与桌面一致，紫色只留给欢迎横幅 */
.topbar {
    background: rgba(255,255,255,.94);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    color: #252b3d;
    box-shadow: 0 2px 14px rgba(30, 40, 90, .08);
}
.topbar .brand { color: #252b3d; }
.topbar .icon-btn { background: #f2f4fa; color: #4a5568; }
.topbar .avatar { background: #4f6ef2; color: #fff; }
.topbar-row2 input { background: #f2f4fa; color: #252b3d; }
.topbar-row2 input::placeholder { color: #9aa3b8; }
.tools-drawer button, .tools-drawer label, .tools-drawer a { background: #f2f4fa; color: #4a5568; }

/* 列表头收成一行：位置与视图/排序按钮同行，不再上下两行零散 */
.list-head { flex-wrap: nowrap; }
.list-head .crumbs { flex: 1 1 auto; order: 0; margin-top: 0; min-width: 0; }
.list-head-right { order: 0; margin-left: 0; flex: 0 0 auto; }

/* 深色适配 */
html[data-theme="dark"] .topbar {
    background: rgba(28,31,43,.94);
    box-shadow: 0 2px 14px rgba(0,0,0,.35);
}
html[data-theme="dark"] .topbar .brand { color: #d7dbe6; }
html[data-theme="dark"] .topbar .icon-btn { background: #232736; color: #c3c9da; }
html[data-theme="dark"] .topbar-row2 input { background: #232736; color: #d7dbe6; }
html[data-theme="dark"] .tools-drawer button,
html[data-theme="dark"] .tools-drawer label,
html[data-theme="dark"] .tools-drawer a { background: #232736; color: #c3c9da; }

/* v27 补：触屏不保留悬停态，点过的分类不会一直显示成选中色 */
@media (hover: none) {
    .toolbar button:hover { background: #fff; border-color: #dfe4f2; color: #4a5568; }
    .toolbar button.active, .toolbar button.active:hover { background: #4f6ef2; border-color: #4f6ef2; color: #fff; box-shadow: 0 4px 12px rgba(79, 110, 242, .3); }
    html[data-theme="dark"] .toolbar button:hover { background: #232736; border-color: #333850; color: #c3c9da; }
    html[data-theme="dark"] .toolbar button.active,
    html[data-theme="dark"] .toolbar button.active:hover { background: #26305a; color: #8fa0ff; box-shadow: inset 0 0 0 1.5px #4f6ef2; }
}

/* ===== v28：布局C 手机端 ===== */
.toolbar-c { display: block; }
.page-tabs { gap: 20px; padding: 2px 16px 0; }
.page-tabs button { min-height: 40px; }
.type-chips { padding: 10px 14px 8px; }
.type-chips::-webkit-scrollbar { display: none; }
/* 覆盖旧 .toolbar button 药丸底，恢复布局C 无底色+底部紫线 */
.toolbar-c .page-tabs button,
.toolbar-c .page-tabs button:hover {
    border: none; background: none; box-shadow: none; border-radius: 0;
    padding: 8px 2px 10px; font-size: 15px; color: #8a94a6;
    border-bottom: 2.5px solid transparent;
}
.toolbar-c .page-tabs button.active,
.toolbar-c .page-tabs button.active:hover {
    background: none; box-shadow: none; color: #252b3d; font-weight: 700;
    border-bottom-color: #4f6ef2;
}
html[data-theme="dark"] .toolbar-c .page-tabs button,
html[data-theme="dark"] .toolbar-c .page-tabs button:hover {
    background: none; box-shadow: none; color: #6b7386; border-bottom: 2.5px solid transparent;
}
html[data-theme="dark"] .toolbar-c .page-tabs button.active,
html[data-theme="dark"] .toolbar-c .page-tabs button.active:hover {
    background: none; box-shadow: none; color: #d7dbe6; border-bottom-color: #4f6ef2;
}

/* v2.1：后台 APP 更新面板手机适配 */
@media (max-width: 640px){
    .appup-hero{padding:13px 14px;border-radius:15px;gap:10px}
    .appup-cover{width:40px;height:40px;border-radius:12px;font-size:19px}
    .appup-hero-text h3{font-size:14.5px}.appup-hero-text p{font-size:10.5px}
    .appup-version-badge{font-size:10.5px;padding:5px 9px}
    .appup-grid{grid-template-columns:1fr}
    .appup-current{grid-template-columns:1fr}
    .appup-form{padding:13px 14px}
    .appup-actions{flex-direction:column}
    .appup-actions .appup-publish{width:100%}
    .appup-actions .appup-delete{width:100%}
}

/* ===== v36 手机端：后台白净化重排 ===== */
@media (max-width: 720px) {
    .admin-main { padding-top: 12px; }
    .admin-head { padding: 16px 16px 15px; border-radius: 16px; }
    .admin-head-copy h1 { font-size: 20px; }
    .admin-head-copy p:not(.admin-eyebrow) { font-size: 11px; }
    .admin-live { padding: 6px 9px; font-size: 10px; }
    .admin-tabs {
        display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 3px; padding: 4px; border-radius: 14px;
        margin-bottom: 12px;
    }
    .admin-tabs button {
        min-height: 38px; padding: 8px 4px; font-size: 12px;
        border-radius: 10px; box-shadow: none;
    }
    .admin-tabs button.active { box-shadow: none; }
    .admin-panel { padding: 15px 14px; border-radius: 15px; }
    .admin-section-head { padding-bottom: 12px; margin-bottom: 12px; }
    .admin-section-head h3 { font-size: 15px; }
    .admin-section-head p { font-size: 10.5px; }
    .stats-clean { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .stats-clean > div { padding: 12px; border-radius: 12px; }
    .stats-clean .wide { grid-column: span 2; }
    .stats-clean b { font-size: 19px; }
    .stats-clean .stat-label { font-size: 10px; margin-bottom: 5px; }
    .stats-clean .stat-foot { font-size: 10px; }
    .admin-tip { font-size: 11px; padding: 0 4px; line-height: 1.6; }
    .recent-title { font-size: 12.5px; }
    .recent-list li { padding: 9px 1px; font-size: 12px; }
    .stats-v24 div::before { display: none !important; }
}

/* v36 final overrides：手机端保持白色、低饱和 */
@media (max-width: 920px) {
    .admin-tabs button.active {
        background: #f1efff !important;
        background-image: none !important;
        color: #4f46e5 !important;
        box-shadow: none !important;
    }
    .stats-clean b {
        background: none !important;
        background-image: none !important;
        -webkit-background-clip: border-box !important;
        background-clip: border-box !important;
        -webkit-text-fill-color: #202536 !important;
        color: #202536 !important;
    }
}
