:root{
--bg:#f4f7fb;--surface:#fff;--muted:#f8fafc;--border:#dfe6ee;--text:#1f2937;--text-muted:#64748b;
--primary:#2563eb;--primary-hover:#1d4ed8;--primary-soft:#eff6ff;--danger:#dc2626;--danger-hover:#b91c1c;
--shadow:0 12px 32px rgba(15,23,42,.08);--radius:14px;--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}body{min-height:100vh;margin:0;color:var(--text);background:var(--bg);font-family:Inter,"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
body.quick-media-mode #desktopCreateFolderButton,body.quick-media-mode #desktopUploadButton,body.quick-media-mode #recycleButton,body.quick-media-mode .desktop-actions .button-link,body.quick-media-mode #mobileMoreButton{display:none!important}
body.quick-media-mode .select-all,body.quick-media-mode #renameButton,body.quick-media-mode #deleteButton,body.quick-media-mode #featuredButton,body.quick-media-mode #mobileSelectAllButton,body.quick-media-mode .mobile-selection-bar{display:none!important}
body.quick-media-mode .col-select{display:none!important}
@media(min-width:760px){body.quick-media-mode .file-row{grid-template-columns:48px minmax(240px,1fr) 190px 120px}body.quick-media-mode .file-header{grid-template-columns:48px minmax(240px,1fr) 190px 120px}}
button,input,select{font:inherit}.hidden{display:none!important}.app-shell{min-height:100vh;display:flex;flex-direction:column;padding-bottom:74px}
.topbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;min-height:64px;padding:10px 14px;border-bottom:1px solid var(--border);background:rgba(255,255,255,.96);backdrop-filter:blur(14px)}
.brand{display:flex;align-items:center;gap:10px}.brand-mark{display:grid;width:40px;height:40px;place-items:center;color:#fff;background:linear-gradient(145deg,#2563eb,#0f4ec9);border-radius:12px;font-size:21px;font-weight:800;box-shadow:0 8px 20px rgba(37,99,235,.24)}
.brand h1{margin:0;font-size:19px}.brand p{margin:2px 0 0;color:var(--text-muted);font-size:10px;letter-spacing:.09em;text-transform:uppercase}.desktop-actions{display:none}.mobile-top-actions{display:flex;gap:8px}
.icon-button{display:grid;width:42px;height:42px;place-items:center;border:1px solid var(--border);border-radius:11px;background:#fff;cursor:pointer}
.main-content{width:100%;margin:0 auto;padding:12px 10px 90px;flex:1}.mobile-search-panel{margin-bottom:10px}.search-box{display:flex;align-items:center;gap:8px;width:100%;height:44px;padding:0 13px;background:#fff;border:1px solid var(--border);border-radius:12px}.search-box input{width:100%;border:0;outline:0;background:transparent}
.breadcrumb{display:flex;align-items:center;gap:5px;min-height:38px;margin:0 0 8px;overflow-x:auto;white-space:nowrap}.breadcrumb-item{max-width:220px;padding:7px 9px;border:0;border-radius:9px;background:#fff;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.breadcrumb-separator{color:#94a3b8}.breadcrumb-parent{flex:0 0 auto;min-height:38px;margin-left:7px;padding:7px 13px;color:var(--primary);border:1px solid #bfdbfe;background:var(--primary-soft);font-weight:700}.breadcrumb-parent:active{transform:scale(.97)}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:8px 10px;border:1px solid var(--border);border-bottom:0;border-radius:14px 14px 0 0;background:#fff}.toolbar-left,.toolbar-right{display:flex;align-items:center;gap:7px}.toolbar-left{min-width:0;overflow-x:auto}.toolbar-right{margin-left:auto}.toolbar-label,.item-count,.selection-count{color:var(--text-muted);font-size:13px;white-space:nowrap}.selection-count{font-weight:700;color:var(--primary)}
.button{min-height:40px;padding:0 13px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;cursor:pointer}.button-primary{color:#fff;border-color:var(--primary);background:var(--primary)}.button-danger{color:#fff;border-color:var(--danger);background:var(--danger)}.button-small{min-height:36px;padding:0 10px;font-size:13px}.button:disabled{opacity:.45;cursor:not-allowed}
select{height:42px;padding:0 30px 0 10px;border:1px solid var(--border);border-radius:10px;background:#fff}
.file-panel{position:relative;min-height:420px;overflow:hidden;border:1px solid var(--border);border-radius:0 0 14px 14px;background:#fff;box-shadow:var(--shadow)}.file-header{display:none}.file-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px}
.file-row{position:relative;display:flex;flex-direction:column;min-width:0;min-height:150px;padding:12px;border:1px solid var(--border);border-radius:14px;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.04);user-select:none}.file-row:active{transform:scale(.99)}.col-select{position:absolute;top:9px;left:9px;z-index:2}.col-select input{width:22px;height:22px}.col-icon{display:flex;justify-content:center;align-items:center;min-height:74px;padding-top:8px}.col-name{min-width:0}.file-name{display:-webkit-box;overflow:hidden;font-weight:700;line-height:1.35;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}.original-path{display:block;margin-top:5px;color:#94a3b8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-date{display:none}.col-size{margin-top:7px;color:var(--text-muted);font-size:12px}
.file-icon{display:grid;width:58px;height:58px;place-items:center;border-radius:14px;font-size:34px}.file-icon-folder{background:#fff7d6}.file-icon-image{background:#eaf2ff}.file-icon-video{color:#7c3aed;background:#f3e8ff}.file-icon-archive{background:#fff1e7}.file-icon-pdf{color:#c91e1e;background:#feecec;font-size:14px;font-weight:800}.file-icon-document{color:#0f766e;background:#e6fffb}.file-icon-file{color:#64748b;background:#eef2f7}
.selection-mode .file-row{cursor:pointer}.selection-mode .file-row:has(input:checked){border-color:var(--primary);background:var(--primary-soft);box-shadow:0 0 0 2px rgba(37,99,235,.12)}
.state-panel{min-height:390px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;color:var(--text-muted);text-align:center}.state-icon{display:grid;width:54px;height:54px;place-items:center;color:var(--primary);background:var(--primary-soft);border-radius:50%;font-size:26px;font-weight:800}.spinner{width:38px;height:38px;border:4px solid #dbeafe;border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}
.footer{display:none}.fab-button{position:fixed;right:18px;bottom:calc(82px + var(--safe-bottom));z-index:65;display:grid;width:58px;height:58px;place-items:center;border:0;border-radius:50%;color:#fff;background:var(--primary);font-size:34px;line-height:1;box-shadow:0 12px 30px rgba(37,99,235,.35);cursor:pointer}
.mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:1fr 1fr;padding:7px 12px calc(7px + var(--safe-bottom));border-top:1px solid var(--border);background:rgba(255,255,255,.97);backdrop-filter:blur(14px)}.mobile-bottom-nav button{display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:transparent;color:#475569}.mobile-bottom-nav span{font-size:22px}.mobile-bottom-nav small{font-size:11px}
.sheet-backdrop,.modal-backdrop{position:fixed;inset:0;z-index:100;display:flex;align-items:flex-end;justify-content:center;padding:0;background:rgba(15,23,42,.5)}.action-sheet{width:100%;max-height:88vh;padding:8px 16px calc(16px + var(--safe-bottom));overflow:auto;background:#fff;border-radius:22px 22px 0 0}.sheet-handle{width:42px;height:5px;margin:0 auto 16px;border-radius:99px;background:#cbd5e1}.action-sheet h2{margin:0 0 12px;font-size:18px}.sheet-action{display:flex;width:100%;align-items:center;gap:14px;padding:14px 8px;border:0;border-bottom:1px solid #edf1f5;background:#fff;text-align:left}.sheet-action>span{display:grid;width:44px;height:44px;place-items:center;border-radius:12px;background:var(--muted);font-size:24px}.sheet-action div{display:flex;flex-direction:column;gap:3px}.sheet-action small{color:var(--text-muted)}.sheet-cancel{width:100%;height:46px;margin-top:12px;border:0;border-radius:12px;background:#f1f5f9}
.modal-backdrop{align-items:center;padding:18px}.modal{width:min(460px,100%);padding:22px;background:#fff;border-radius:16px;box-shadow:0 24px 60px rgba(15,23,42,.24)}.modal h2{margin:0 0 8px}.modal p{color:var(--text-muted);line-height:1.6}.modal-input{width:100%;height:44px;padding:0 12px;border:1px solid var(--border);border-radius:10px;outline:0}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.radio-row{display:flex;align-items:flex-start;gap:10px;padding:10px 0}.radio-row input{width:20px;height:20px}
.upload-panel{position:fixed;left:10px;right:10px;bottom:calc(70px + var(--safe-bottom));z-index:80;max-height:58vh;overflow:hidden;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:0 18px 50px rgba(15,23,42,.22)}.upload-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px}.upload-panel header>div:first-child{display:flex;flex-direction:column}.upload-panel header small{color:var(--text-muted)}.upload-panel-actions{display:flex;gap:7px}.upload-panel-actions button{min-height:34px;border:1px solid var(--border);border-radius:8px;background:#fff}.overall-progress,.item-progress{height:5px;background:#e2e8f0;overflow:hidden}.overall-progress span,.item-progress span{display:block;height:100%;background:var(--primary);transition:width .2s}.upload-queue{max-height:42vh;overflow:auto}.upload-item{display:flex;align-items:center;gap:10px;padding:11px 14px;border-top:1px solid #edf1f5}.upload-item-info{display:flex;min-width:0;flex:1;flex-direction:column;gap:4px}.upload-item strong,.upload-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-item small{color:var(--text-muted)}.upload-item button{border:0;background:transparent;color:var(--danger)}.upload-panel.collapsed .upload-queue{display:none}.upload-panel.collapsed{max-height:none}
.drop-overlay{position:absolute;inset:0;z-index:20;display:grid;place-items:center;background:rgba(239,246,255,.9);border:3px dashed var(--primary)}.drop-overlay-card{text-align:center;color:var(--primary)}.drop-icon{font-size:48px}.toast{position:fixed;left:50%;bottom:calc(94px + var(--safe-bottom));z-index:140;transform:translateX(-50%);padding:12px 16px;color:#fff;background:#0f172a;border-radius:10px;white-space:nowrap}
.desktop-only{display:none!important}
@keyframes spin{to{transform:rotate(360deg)}}

@media(min-width:760px){
.app-shell{padding-bottom:0}.topbar{min-height:76px;padding:14px clamp(18px,4vw,48px)}.desktop-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;flex:1}.desktop-actions .search-box{width:min(360px,38vw)}.mobile-top-actions,.mobile-bottom-nav,.fab-button,.mobile-search-panel{display:none!important}
.main-content{width:min(1460px,calc(100% - 36px));margin:22px auto 28px;padding:0}.desktop-only{display:initial!important}.toolbar{padding:8px 12px}.file-header{display:grid;grid-template-columns:42px 48px minmax(240px,1fr) 190px 120px;align-items:center;min-height:42px;color:var(--text-muted);background:var(--muted);border-bottom:1px solid var(--border);font-size:13px;font-weight:700}
.file-list{display:block;padding:0}.file-row{display:grid;grid-template-columns:42px 48px minmax(240px,1fr) 190px 120px;align-items:center;min-height:60px;padding:0;border:0;border-bottom:1px solid #edf1f5;border-radius:0;box-shadow:none}.file-row:hover{background:#f8fbff}.col-select{position:static;display:flex;justify-content:center}.col-select input{width:18px;height:18px}.col-icon{min-height:auto;padding:0}.file-icon{width:31px;height:31px;border-radius:8px;font-size:18px}.col-name,.col-date,.col-size{padding:0 12px}.file-name{display:block;font-weight:500;white-space:nowrap;text-overflow:ellipsis}.col-date{display:block;color:var(--text-muted);font-size:14px}.col-size{margin:0;padding-right:22px;text-align:right;color:var(--text-muted);font-size:14px}.footer{display:flex;justify-content:space-between;padding:16px clamp(18px,4vw,48px);color:var(--text-muted);border-top:1px solid var(--border);background:rgba(255,255,255,.7);font-size:13px}
.sheet-backdrop{align-items:center;padding:18px}.action-sheet{width:min(480px,100%);border-radius:20px}.upload-panel{left:auto;right:24px;bottom:24px;width:430px}.toast{left:auto;right:24px;bottom:24px;transform:none}
}


/* TED Cloud v1.2.1 */
@media(max-width:759px){
.toolbar-left>#renameButton,.toolbar-left>#deleteButton,.toolbar-left>#restoreButton,.toolbar-left>#permanentDeleteButton{display:none!important}.toolbar-left{max-width:90px;flex:0 0 auto}.toolbar{min-height:58px}
.mobile-selection-bar{position:fixed;left:8px;right:8px;bottom:calc(68px + var(--safe-bottom));z-index:75;display:flex;flex-direction:column;gap:9px;padding:11px;border:1px solid var(--border);border-radius:16px;background:rgba(255,255,255,.98);box-shadow:0 16px 45px rgba(15,23,42,.22);backdrop-filter:blur(12px)}
.mobile-selection-bar strong{color:var(--primary);font-size:14px}.mobile-selection-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.mobile-selection-actions button{min-width:0;min-height:42px;padding:0 8px;border:1px solid var(--border);border-radius:10px;background:#fff;font-size:13px;font-weight:700;white-space:nowrap}.mobile-selection-actions button.danger{color:#fff;border-color:var(--danger);background:var(--danger)}.selection-mode .fab-button{display:none!important}}
@media(min-width:760px){.mobile-selection-bar{display:none!important}}
.upload-panel.upload-complete-state header{background:#ecfdf5}.upload-panel.upload-complete-state .overall-progress span{background:#16a34a}
.preview-open{overflow:hidden}.preview-backdrop{position:fixed;inset:0;z-index:200;display:grid;grid-template-rows:auto 1fr;background:rgba(3,7,18,.97);color:#fff;touch-action:none}.preview-header{z-index:4;display:grid;grid-template-columns:48px minmax(0,1fr) 48px;align-items:center;gap:8px;min-height:58px;padding:calc(6px + env(safe-area-inset-top)) 8px 6px;background:rgba(3,7,18,.72);backdrop-filter:blur(10px)}.preview-header>div{min-width:0;text-align:center}.preview-header strong,.preview-header small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.preview-header small{color:#cbd5e1;font-size:12px}.preview-header button,.preview-nav{display:grid;place-items:center;border:0;color:#fff;background:rgba(255,255,255,.12);cursor:pointer}.preview-header button{width:42px;height:42px;border-radius:50%;font-size:24px}.preview-stage{position:relative;display:grid;min-width:0;min-height:0;place-items:center;overflow:hidden}.preview-image{display:block;max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;transition:transform .16s ease;user-select:none;-webkit-user-drag:none}.preview-nav{position:absolute;top:50%;z-index:5;width:46px;height:58px;border-radius:12px;transform:translateY(-50%);font-size:40px}.preview-nav-previous{left:8px}.preview-nav-next{right:8px}@media(max-width:759px){.preview-nav{display:none}}


/* TED Cloud v1.2.2 verification fixes */
.upload-panel.temporarily-hidden{
    display:none!important;
}

@media(max-width:759px){
    .mobile-selection-bar{
        z-index:130!important;
        pointer-events:auto!important;
    }

    .mobile-selection-actions,
    .mobile-selection-actions button{
        pointer-events:auto!important;
    }

    .mobile-selection-actions button{
        touch-action:manipulation;
    }

    .preview-backdrop{
        z-index:220!important;
    }

    .file-row[data-type="image"]{
        cursor:pointer;
    }
}


/* v1.3 Travel Edition */
.gallery-brand{text-decoration:none;color:inherit}.button-link{display:inline-flex;align-items:center;text-decoration:none}
.mobile-select-all{display:none}
@media(max-width:759px){
  .mobile-select-all{display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap}
  .toolbar-left{max-width:none;overflow:visible}
  .mobile-selection-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.preview-backdrop{width:100vw;height:100vh;height:100dvh;overflow:hidden}
.preview-stage{width:100%;height:100%;min-height:0;overflow:hidden}
.preview-image{max-width:none!important;max-height:none!important;transform-origin:center center;will-change:transform}
.developer-version{opacity:.55}


/* v1.3.1 Preview viewer hotfix */
.preview-backdrop{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100vh!important;
    height:100dvh!important;
    overflow:hidden!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    background:rgba(3,7,18,.98)!important;
}

.preview-header{
    position:relative!important;
    z-index:4!important;
    min-height:58px!important;
}

.preview-stage{
    position:relative!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    padding:12px 64px 16px!important;
}

.preview-image{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
    transform-origin:center center!important;
    margin:auto!important;
    user-select:none!important;
    -webkit-user-drag:none!important;
    will-change:transform!important;
}

@media(max-width:759px){
    .preview-stage{
        padding:8px!important;
    }

    .preview-image{
        max-width:100%!important;
        max-height:100%!important;
    }
}

@media(orientation:landscape) and (max-height:560px){
    .preview-header{
        min-height:48px!important;
        padding-top:4px!important;
        padding-bottom:4px!important;
    }

    .preview-stage{
        padding:4px 8px!important;
    }
}


/* BUG-011: Preview must remain closed until a photo is explicitly selected. */
.preview-backdrop.hidden {
    display: none !important;
}


/* v1.3.2 Gallery thumbnails */
.file-thumbnail-frame{
    display:block;
    overflow:hidden;
    border-radius:10px;
    background:#eef2f7;
    box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);
}

.file-thumbnail{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
}

.thumbnail-fallback{
    display:grid;
    place-items:center;
}

.preview-header{
    grid-template-columns:48px minmax(0,1fr) 48px 48px!important;
}

.preview-featured-button{
    color:#ffd865!important;
    font-size:27px!important;
}

.preview-featured-button:disabled{
    opacity:.55;
}

@media(max-width:759px){
    .file-row .col-icon{
        width:100%;
        min-height:104px;
        padding:0 0 9px;
    }

    .file-thumbnail-frame{
        width:100%;
        height:104px;
        border-radius:11px;
    }

    .file-row{
        min-height:174px;
    }

    .preview-header{
        grid-template-columns:42px minmax(0,1fr) 42px 42px!important;
        gap:4px!important;
    }
}

@media(min-width:760px){
    .file-header,
    .file-row{
        grid-template-columns:42px 90px minmax(240px,1fr) 190px 120px;
    }

    .file-thumbnail-frame{
        width:72px;
        height:50px;
    }

    .file-row .col-icon{
        justify-content:center;
    }
}


/* TED Cloud v1.3.5 Video Preview Edition */
.file-thumbnail-frame{
    position:relative;
}

.video-play-badge{
    position:absolute;
    right:8px;
    bottom:7px;
    display:grid;
    width:30px;
    height:30px;
    place-items:center;
    border-radius:50%;
    color:#fff;
    background:rgba(0,0,0,.72);
    box-shadow:0 3px 10px rgba(0,0,0,.35);
    font-size:14px;
}

.live-photo-badge{
    position:absolute;
    top:6px;
    left:6px;
    padding:3px 7px;
    border-radius:999px;
    color:#fff;
    background:rgba(0,0,0,.65);
    font-size:10px;
    font-weight:800;
    letter-spacing:.08em;
}

.hover-video-preview{
    position:absolute;
    inset:0;
    z-index:2;
    width:100%;
    height:100%;
    object-fit:cover;
    border-radius:inherit;
    background:#000;
}

.folder-cover-frame::after{
    content:'📁';
    position:absolute;
    left:7px;
    bottom:5px;
    filter:drop-shadow(0 2px 4px rgba(0,0,0,.55));
    font-size:20px;
}

.video-backdrop{
    position:fixed;
    inset:0;
    z-index:220;
    display:grid;
    grid-template-rows:auto minmax(0,1fr);
    width:100vw;
    height:100vh;
    height:100dvh;
    overflow:hidden;
    color:#fff;
    background:rgba(3,7,18,.98);
}

.video-backdrop.hidden{
    display:none!important;
}

.video-header{
    display:grid;
    grid-template-columns:48px minmax(0,1fr) 48px;
    align-items:center;
    gap:8px;
    min-height:58px;
    padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left));
    padding-top:calc(6px + env(safe-area-inset-top));
    background:rgba(3,7,18,.78);
}

.video-header>div{
    min-width:0;
    text-align:center;
}

.video-header strong,
.video-header small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.video-header small{
    color:#fca5a5;
    font-size:12px;
}

.video-header button{
    width:42px;
    height:42px;
    border:0;
    border-radius:50%;
    color:#fff;
    background:rgba(255,255,255,.12);
    font-size:23px;
}

.video-stage{
    position:relative;
    display:flex;
    min-width:0;
    min-height:0;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    padding:10px;
}

.video-stage video{
    display:block;
    width:auto;
    height:auto;
    max-width:100%;
    max-height:100%;
    background:#000;
}

.video-fallback{
    max-width:520px;
    padding:28px;
    border-radius:16px;
    background:#fff;
    color:#1f2937;
    text-align:center;
}

@media(max-width:759px){
    .video-play-badge{
        width:34px;
        height:34px;
    }

    .folder-cover-frame::after{
        font-size:24px;
    }
}


/* TED Cloud Patch 02: upload panel action hierarchy */
.upload-panel-actions{align-items:center}
.upload-panel-actions #toggleUploadPanel{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    min-width:96px;
    min-height:46px;
    padding:0 14px;
    border:2px solid var(--primary);
    color:#fff;
    background:var(--primary);
    font-size:16px;
    font-weight:800;
    line-height:1;
    box-shadow:0 5px 14px rgba(37,99,235,.24);
    cursor:pointer;
    touch-action:manipulation;
}
.upload-panel-actions #toggleUploadPanel:active{transform:translateY(1px)}
.upload-panel-actions #cancelAllUploads{
    min-width:0;
    min-height:30px;
    padding:0 8px;
    border-color:#fecaca;
    color:var(--danger);
    background:#fff;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    touch-action:manipulation;
}
@media(max-width:759px){
    .upload-panel header{padding:10px 12px}
    .upload-panel header>div:first-child{min-width:0;flex:1}
    .upload-panel-actions{flex:0 0 auto;gap:6px}
    .upload-panel-actions #toggleUploadPanel{min-width:104px;min-height:48px;padding:0 15px}
    .upload-panel-actions #cancelAllUploads{min-height:30px;padding:0 7px;font-size:11px}
}

/* Patch 05: touch-friendly inline video thumbnail preview */
.video-thumbnail-frame.touch-video-preview-enabled{
    cursor:pointer;
    touch-action:manipulation;
}

.video-thumbnail-frame.thumbnail-video-playing .video-play-badge{
    z-index:3;
    background:rgba(0,0,0,.78);
}

/* Patch 05B: keep the mobile gallery and fixed bottom navigation aligned to the visual viewport. */
@media(max-width:759px){
    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .app-shell,
    .topbar,
    .main-content,
    .file-panel,
    .file-list{
        width:100%;
        max-width:100%;
        min-width:0;
    }

    .main-content{
        margin-left:0;
        margin-right:0;
    }

    .mobile-bottom-nav{
        left:0;
        right:auto;
        width:100%;
        max-width:100vw;
        min-width:0;
    }

    .mobile-bottom-nav button{
        min-width:0;
    }
}


/* Patch 06: mixed image/video navigation in the main preview viewer. */
.preview-media-video{
    display:block;
    width:auto;
    height:auto;
    max-width:100%;
    max-height:100%;
    margin:auto;
    background:#000;
    touch-action:pan-y;
}
.preview-stage>.video-fallback{
    position:relative;
    z-index:2;
}
.preview-header .preview-featured-button.hidden,
.preview-stage>.hidden{
    display:none!important;
}
