/* Mobile-only UX layer. Desktop rules are intentionally untouched. */
@media (max-width:800px){
  :root{--mobile-safe-top:max(10px,env(safe-area-inset-top));--mobile-safe-bottom:max(10px,env(safe-area-inset-bottom));--mobile-touch:44px}
  html,body{width:100%;max-width:100%;min-height:100dvh;overflow-x:hidden}
  body{overscroll-behavior-y:auto;-webkit-text-size-adjust:100%;touch-action:manipulation}
  body.mobile-modal-open,body.mobile-sheet-open,body.mobile-action-menu-open{overflow:hidden!important;overscroll-behavior:none!important}
  main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main)>.page-shell{padding-left:10px!important;padding-right:10px!important;padding-bottom:calc(20px + env(safe-area-inset-bottom))!important}

  button,a.button,.button,input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select{min-height:var(--mobile-touch)}
  input,select,textarea{font-size:16px!important}
  button,.button,a.button{touch-action:manipulation}
  .icon-btn,.icon-button,.drive-more-btn,.work-card-more,.kanban-task-more,.kanban-col-more,.kanban-add,.preview-head-action{min-width:44px!important;width:44px!important;min-height:44px!important;height:44px!important}

  .mobile-menu{width:44px!important;height:44px!important;min-height:44px!important;border-radius:10px!important;left:max(10px,env(safe-area-inset-left))!important;top:var(--mobile-safe-top)!important}
  .app-sidebar{width:min(88vw,320px)!important;max-width:320px!important;overflow-y:auto!important;overscroll-behavior:contain!important}
  .sidebar-nav a,.sidebar-nav button,.sidebar-bottom a,.sidebar-bottom button{min-height:44px!important}

  header,.compact-head,.file-header{margin:0 -10px!important;padding:calc(56px + env(safe-area-inset-top)) 10px 10px!important;min-height:104px!important}
  header h1,.compact-head h1,.file-header h1{font-size:19px!important;line-height:1.2!important}
  .global-top-actions{top:var(--mobile-safe-top)!important;right:max(10px,env(safe-area-inset-right))!important}

  /* Desktop context menus become finger-friendly bottom sheets on mobile. */
  .mobile-action-scrim{position:fixed;inset:0;z-index:5900;background:rgba(0,0,0,.34);touch-action:none}
  .mobile-action-scrim[hidden]{display:none!important}
  .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating{
    position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;max-width:none!important;max-height:min(78dvh,620px)!important;overflow:auto!important;
    border-radius:16px!important;padding:8px!important;z-index:6000!important;box-shadow:0 20px 64px rgba(0,0,0,.28)!important;
    overscroll-behavior:contain!important;
  }
  .drive-context-menu button,.drive-selection-more-menu button,.global-context-menu button,.global-context-items button,.work-card-dropdown button,.work-card-dropdown a,.kanban-item-menu button,.chat-context-menu button,.message-context-menu button,.sheet2-context button,.sheet2-menu-pop button,.share-menu button,.drive-new-menu button,.workspace-menu a,.worktrack-new-floating button{
    min-height:46px!important;height:auto!important;padding:10px 12px!important;border-radius:10px!important;font-size:14px!important;line-height:1.25!important;
  }
  .drive-context-head,.global-context-head{padding:8px 9px 11px!important}
  .drive-context-head b,.global-context-head b{font-size:14px!important}
  .drive-context-head small,.global-context-head small{font-size:11px!important}
  .work-card-dropdown{min-width:0!important}

  /* Dialogs: one-hand bottom sheets, safe-area aware, keyboard-safe. */
  dialog:not(.cloud-preview-drawer):not(.wt-mobile-row-dialog){
    max-width:none!important;width:calc(100vw - 16px)!important;max-height:min(88dvh,760px)!important;
    margin:0 8px max(8px,env(safe-area-inset-bottom))!important;inset:auto 0 0!important;
    border-radius:18px!important;overflow:auto!important;overscroll-behavior:contain!important;
  }
  dialog::backdrop{background:rgba(0,0,0,.46)!important;backdrop-filter:none!important}
  dialog form{max-width:100%!important;min-width:0!important;box-sizing:border-box!important}
  dialog .modal-actions{position:sticky;bottom:0;z-index:2;background:var(--dialog,var(--surface-main));padding-bottom:max(10px,env(safe-area-inset-bottom))!important}
  dialog .modal-actions button{min-height:46px!important}

  /* Drive */
  .drive-commandbar{margin:0 -10px 8px!important;padding:7px 10px!important;gap:6px!important;flex-wrap:nowrap!important;overflow-x:auto!important;overscroll-behavior-x:contain!important;scrollbar-width:none}
  .drive-commandbar::-webkit-scrollbar{display:none}
  .drive-view-actions{width:auto!important;min-width:max-content!important;overflow:visible!important;gap:5px!important}
  .drive-quick-action,.drive-layout-option,.drive-new-top{min-height:44px!important;height:44px!important}
  .drive-quick-action{min-width:44px!important;padding:0 11px!important}
  .drive-quick-action span{display:none!important}
  .drive-new-top{padding:0 14px!important}
  .drive-location-toolbar{min-height:48px!important;margin:0 -10px 8px!important;padding:6px 10px!important;overflow:hidden!important}
  .drive-location-current{min-width:0!important}.crumbs{overflow-x:auto!important;white-space:nowrap!important;flex-wrap:nowrap!important;scrollbar-width:none!important}.crumbs::-webkit-scrollbar{display:none}
  .drive-toolbar-meta{display:none!important}
  .drive-folder-grid{grid-template-columns:1fr!important;gap:7px!important}
  .drive-files-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .filecard{min-width:0!important;touch-action:manipulation!important}
  .filecard.drive-folder-card{padding-right:54px!important}
  .filecard.file-tile{height:auto!important;min-height:156px!important;grid-template-rows:102px minmax(54px,auto)!important}
  .filecard .preview{height:102px!important;min-height:102px!important}
  .filecard.file-tile .file-meta-row{height:54px!important;padding:7px 50px 5px 7px!important}
  .filecard .fileinfo b,.filecard .file-name{font-size:12px!important}
  .drive-more-btn{right:4px!important;border-radius:10px!important;background:color-mix(in srgb,var(--surface-main) 84%,transparent)!important}
  .filecard.file-tile>.drive-more-btn{top:auto!important;bottom:5px!important}
  .drive-folder-card>.drive-more-btn{right:4px!important}
  .drive-folder-select{min-width:44px!important;min-height:44px!important}
  .drive-select-mode-btn span{display:inline!important}
  .gallery.list-view .filecard,#driveDropTarget.list-view .filecard{min-height:58px!important;height:58px!important;grid-template-columns:44px minmax(0,1fr) 44px!important}
  .drive-toolbar-selection-mode{position:sticky!important;top:0!important;z-index:20!important;min-width:max-content!important}
  .drive-toolbar-selection-actions button{min-height:44px!important}

  /* Preview */
  .cloud-preview-drawer{inset:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;padding-bottom:env(safe-area-inset-bottom)!important}
  .cloud-preview-drawer-head{height:58px!important;min-height:58px!important;padding:env(safe-area-inset-top) 8px 0 10px!important;box-sizing:content-box!important}
  .cloud-preview-drawer-actions{gap:2px!important}.preview-head-download{width:44px!important;height:44px!important;padding:0!important}.preview-head-download span{display:none!important}
  .cloud-preview-content .rich-preview-canvas{min-height:calc(100dvh - 190px)!important;padding:8px!important}
  .cloud-preview-content .rich-preview-canvas img,.cloud-preview-content .rich-preview-canvas video{width:auto!important;max-width:100%!important;max-height:calc(100dvh - 190px)!important;object-fit:contain!important}
  .rich-preview-topbar{position:sticky!important;top:0!important;z-index:8!important;min-height:58px!important;padding:max(7px,env(safe-area-inset-top)) 8px 7px!important;gap:6px!important;flex-wrap:nowrap!important}
  .preview-back{min-width:44px!important;width:44px!important;height:44px!important}.preview-title{min-width:0!important;flex:1!important}.preview-title b{font-size:13px!important}.preview-title small{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .preview-actions{display:flex!important;gap:4px!important;flex:0 0 auto!important}.preview-actions .ghost{display:none!important}.preview-actions .primary{min-width:44px!important;width:44px!important;padding:0!important;font-size:0!important}.preview-actions .primary svg{margin:0!important}
  .rich-preview-layout{grid-template-columns:1fr!important}.rich-preview-info{display:none!important}.rich-preview-stage{min-height:calc(100dvh - 70px)!important}
  .rich-preview-canvas img,.rich-preview-canvas video{max-width:100%!important;max-height:calc(100dvh - 110px)!important;object-fit:contain!important}
  .rich-text-preview{font-size:13px!important;line-height:1.55!important;white-space:pre-wrap!important;word-break:break-word!important}

  /* Worktrack file/folder screen */
  .work-head{padding:calc(56px + env(safe-area-inset-top)) 0 9px!important;gap:8px!important}
  .work-actions{width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  .work-actions>*{min-height:44px!important;justify-content:center!important;padding:0 8px!important;font-size:11px!important}
  .work-crumbs{overflow-x:auto!important;flex-wrap:nowrap!important;white-space:nowrap!important;margin:8px 0!important;padding-bottom:2px!important;scrollbar-width:none!important}.work-crumbs::-webkit-scrollbar{display:none}
  .work-grid{grid-template-columns:1fr!important;gap:2px!important}
  .work-card{height:auto!important;min-height:62px!important;padding:8px 4px 8px 8px!important;border-radius:9px!important}
  .work-card-main{min-height:46px!important}.work-card-main b{font-size:13px!important}.work-card-main small{font-size:10.5px!important}.work-card-more{width:44px!important;height:44px!important;min-height:44px!important}

  /* Kanban dialogs share the mobile sheet geometry; board rules are consolidated below. */
  .kanban-detail-panel{width:calc(100vw - 16px)!important;max-height:min(90dvh,780px)!important;margin:0 8px max(8px,env(safe-area-inset-bottom))!important;inset:auto 0 0!important;border-radius:18px!important}.kanban-detail-panel form{max-height:min(90dvh,780px)!important}.kanban-panel-head{min-height:64px!important}.kanban-panel-body{padding:13px!important}.kanban-panel-actions{grid-template-columns:1fr 1fr!important;gap:7px!important;padding:9px 10px calc(9px + env(safe-area-inset-bottom))!important}.kanban-panel-actions>span{display:none!important}.kanban-panel-actions button{min-height:46px!important}.kanban-field-grid{grid-template-columns:1fr!important}

  /* Tables / Excel */
  .table-workbook-frame,.workbook-frame{height:100dvh!important;min-height:100dvh!important}
  .workbook-rail-head{min-height:56px!important}.workbook-tab-row{min-width:118px!important}.workbook-tab-row>a{min-height:44px!important}
  #sheetApp .sheet2-top{padding-top:max(6px,env(safe-area-inset-top))!important}.sheet2-context,.sheet2-menu-pop{font-size:14px!important}

  /* Search / users / trash / generic cards */
  .global-search-popover{bottom:8px!important;max-height:none!important}.global-search-list{max-height:calc(100dvh - 150px)!important}
  .usercard,.trash-card,.scheduled-item,.share-center-row,.vault-card,.app-card{max-width:100%!important;min-width:0!important}
  .checks,.appearance-choice-grid,.scale-options{grid-template-columns:1fr!important}

  /* Prevent tiny horizontal leaks. */
  img,video,canvas,iframe,table{max-width:100%}
  [role="dialog"],dialog,.page-shell,.panelcard,.compact-head,.file-header,.work-head{box-sizing:border-box}
}
@media (max-width:389px){
  .drive-files-grid{grid-template-columns:1fr!important}
  .work-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .kanban-head-actions button{padding:0 8px!important;font-size:11px!important}
}
@media(max-width:800px){
  .cloud-toast-stack{top:max(10px,env(safe-area-inset-top))!important;width:min(94vw,620px)!important}
  .cloud-toast{grid-template-columns:8px minmax(0,1fr) auto auto!important;min-height:52px!important}
  .cloud-toast-copy{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:0 8px!important}
  .cloud-toast-close{min-width:44px!important;width:44px!important;min-height:44px!important;height:44px!important}
}

/* 2026-09-29 — mobile clarity pass: no desktop-shrunk layouts */
@media (max-width:800px){
  /* Generic mobile guardrails */
  .compact-head>div:first-child,.file-header>div:first-child,header>div:first-child{min-width:0!important}
  .compact-head p,.file-header p{max-width:78vw!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .panelcard,.share-panel,.mail-layout,.analysis-shell,.messenger,.kanban-board,.unified-trash-grid{min-width:0!important;max-width:100%!important}

  /* Trash: list-first, obvious actions, tap previews instead of hidden double-tap. */
  .route-trash-center .file-header.trash-page-head{min-height:112px!important;align-items:flex-end!important;gap:8px!important}
  .route-trash-center .trash-page-head p{font-size:11px!important;max-width:72vw!important}.trash-settings-btn{min-width:44px!important;padding:0 10px!important;font-size:11px!important}
  .trash-policy{margin:4px 0 10px!important;padding:10px!important;align-items:flex-start!important}.trash-policy>span{width:32px!important;height:32px!important}.trash-policy b{font-size:12px!important}.trash-policy small{font-size:10px!important}
  .trash-people-section{margin:12px 0 14px!important}.trash-section-head{align-items:flex-end!important}.trash-section-head .ghost{min-height:44px!important;padding:0 10px!important;font-size:11px!important}.trash-people-grid{grid-template-columns:1fr!important}
  .trash-bulkbar{position:sticky!important;top:0!important;z-index:12!important;display:grid!important;grid-template-columns:auto 1fr!important;gap:4px 10px!important;padding:7px 8px!important;background:var(--surface-main)!important;border-color:var(--line-strong)!important}.trash-bulkbar>span{text-align:right!important;align-self:center!important}.trash-bulkbar form{grid-column:1/-1!important;margin:0!important}.trash-bulkbar form .danger{width:100%!important;min-height:44px!important}
  .trash-main-list{gap:7px!important}.trash-entry{grid-template-columns:36px minmax(0,1fr)!important;gap:9px!important;min-height:0!important;padding:11px 9px 9px 42px!important;align-items:start!important}.trash-entry>.trash-kind{grid-column:1!important;grid-row:1!important;width:36px!important;height:36px!important}.trash-entry>div:not(.trash-card-actions){grid-column:2!important;grid-row:1!important;min-width:0!important;padding-top:1px!important}.trash-entry>div:not(.trash-card-actions)>b{font-size:13px!important;white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}.trash-entry small{font-size:10px!important;line-height:1.35!important;overflow-wrap:anywhere!important}.trash-entry time{font-size:9.5px!important;line-height:1.35!important}.trash-entry .trash-card-actions{grid-column:1/-1!important;grid-row:2!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;margin-top:3px!important}.trash-entry .trash-card-actions .trash-copy-link{grid-column:1/-1!important}.trash-entry .trash-card-actions form{width:100%!important}.trash-entry .trash-card-actions button{width:100%!important;min-height:44px!important;font-size:11.5px!important;padding:0 8px!important}.trash-entry .trash-select{left:8px!important;top:13px!important;transform:none!important}.trash-item-check{width:20px!important;height:20px!important}

  /* Messages: drawer + one clear header + composer. No long press needed. */
  .route-chat .compact-head.chat-page-head{min-height:104px!important}.route-chat .chat-page-head p{font-size:10.5px!important;max-width:62vw!important}.route-chat .compact-primary{min-height:44px!important;padding:0 12px!important;font-size:11px!important}
  .messenger,.messenger-v5,.messenger-v6,.messenger-v7{height:calc(var(--chat-vvh,100dvh) - 104px)!important;min-height:420px!important;border-top:1px solid var(--line)!important}
  .chat-sidebar{width:min(92vw,350px)!important;padding:8px!important}.mobile-chat-drawer-head{min-height:50px!important;padding:4px 4px 8px!important}.chat-side-head small{display:none!important}.drag-handle{display:none!important}.chat-row{min-height:56px!important;padding:7px!important}.chat-row-menu{width:44px!important;height:44px!important;min-width:44px!important;opacity:1!important}.chat-icon,.chat-avatar{width:36px!important;height:36px!important}.chat-row-text b{font-size:13px!important}.chat-row-text small{font-size:10px!important}
  .conversation,.conversation-v5,.conversation-v6,.conversation-v7{grid-template-rows:58px auto minmax(0,1fr) auto!important}.conversation-head{min-height:58px!important;padding:6px 8px!important;gap:6px!important}.mobile-chat-switch{min-height:44px!important;padding:0 7px!important;border-radius:9px!important;background:var(--surface-sunken)!important}.conversation-title b{font-size:13px!important}.conversation-tools{display:none!important}.mobile-chat-current-more{display:grid!important;place-items:center!important;margin-left:0!important}.mobile-chat-current-more[hidden]{display:none!important}.chat-search-toggle{margin-left:auto!important}
  .chat-inline-search{padding:7px 8px!important}.chat-inline-search input{min-height:44px!important}
  #messages{padding:12px 9px 14px!important;gap:9px!important;overscroll-behavior:contain!important}.msg{max-width:86%!important;padding:9px 11px!important}.msg p{font-size:13px!important}.message-file{min-width:0!important;max-width:100%!important}.message-media-preview{max-width:100%!important}
  .message-more{display:grid!important;place-items:center!important;left:auto!important;right:4px!important;top:4px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;opacity:1!important;background:color-mix(in srgb,var(--surface-main) 72%,transparent)!important}.msg p,.msg .message-file,.msg .message-meta{padding-right:38px!important}.share-message{display:none!important}
  .chat-composer{grid-template-columns:44px minmax(0,1fr) 44px!important;gap:6px!important;padding:7px 8px calc(7px + env(safe-area-inset-bottom))!important}.chat-composer .emoji-btn{display:none!important}.chat-composer .attach-btn{width:44px!important;height:44px!important}.composer-main{min-height:44px!important;padding:4px 7px!important}.composer-main textarea{min-height:34px!important;max-height:96px!important;resize:none!important}.send-btn{width:44px!important;height:44px!important;min-height:44px!important;padding:0!important}.send-btn span{display:none!important}.file-chips span{max-width:100%!important}

  /* Kanban: one list at a time. Switching lists is explicit, move stays in 3-dot menu. */
  .kanban-head{padding-top:calc(58px + env(safe-area-inset-top))!important;min-height:108px!important}.kanban-head>div:first-child p{font-size:10.5px!important;max-width:52vw!important}.kanban-head-actions{display:flex!important;gap:5px!important}.kanban-head-actions button{min-height:44px!important;height:44px!important;padding:0 10px!important;font-size:11px!important}
  .kanban-mobile-tabs{display:flex!important;position:sticky!important;top:0!important;z-index:14!important;gap:6px!important;overflow-x:auto!important;padding:7px 0 8px!important;margin:0 0 2px!important;background:var(--app-bg,var(--surface-main))!important;scrollbar-width:none!important;overscroll-behavior-x:contain!important}.kanban-mobile-tabs::-webkit-scrollbar{display:none!important}.kanban-mobile-tabs button{flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:7px!important;min-height:44px!important;padding:0 11px!important;border:1px solid transparent!important;border-radius:10px!important;background:var(--surface-main)!important;color:var(--muted)!important;font-size:11.5px!important;font-weight:650!important}.kanban-mobile-tabs button small{min-width:20px!important;height:20px!important;padding:0 5px!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:var(--surface-sunken)!important;color:var(--metadata)!important;font-size:9px!important}.kanban-mobile-tabs button.active{background:var(--surface-selected)!important;color:var(--text)!important;border-color:transparent!important}.kanban-mobile-tabs button.active small{background:var(--surface-main)!important;color:var(--text)!important}
  .kanban-board{display:block!important;padding:7px 0 calc(18px + env(safe-area-inset-bottom))!important;overflow:visible!important;min-height:0!important;scroll-snap-type:none!important}.kanban-column{display:none!important;width:100%!important;min-width:0!important;margin:0!important;padding:8px!important;border-radius:12px!important;background:var(--surface-sunken)!important;scroll-snap-align:none!important}.kanban-column.mobile-active{display:block!important}.kanban-col-head{position:sticky!important;top:54px!important;z-index:7!important;min-height:52px!important;height:auto!important;padding:4px 2px 6px 5px!important;background:var(--surface-sunken)!important}.kanban-col-head b{font-size:13px!important}.kanban-count{font-size:10px!important}.kanban-col-actions button{min-width:44px!important;width:44px!important;height:44px!important;min-height:44px!important}.kanban-tasks{gap:8px!important}.kanban-card,.kanban-card.kanban-selected{padding:11px 10px!important;border-radius:11px!important;background:var(--surface-main)!important;box-shadow:none!important;touch-action:manipulation!important}.kanban-card[draggable="true"]{cursor:default!important}.kanban-card-topline{grid-template-columns:44px minmax(0,1fr) 44px!important;gap:5px!important}.kanban-complete-btn,.kanban-task-more{width:44px!important;height:44px!important;min-height:44px!important}.kanban-card-title{font-size:13px!important;line-height:1.4!important}.kanban-card-desc{font-size:11.5px!important;line-height:1.45!important;-webkit-line-clamp:3!important}.kanban-card-thumbs{gap:6px!important}.kanban-card-thumb{width:62px!important;min-width:62px!important;height:46px!important}.kanban-add-task{position:sticky!important;bottom:max(8px,env(safe-area-inset-bottom))!important;z-index:8!important;min-height:48px!important;margin-top:9px!important;justify-content:center!important;background:var(--surface-main)!important;border:1px solid transparent!important;border-radius:11px!important;color:var(--text)!important}.kanban-item-menu{left:8px!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-height:70dvh!important}.kanban-item-menu button{min-height:46px!important;font-size:13px!important}.kanban-menu-label{padding:10px 10px 5px!important}
}


/* 2026-09-29 — mobile opened-panel readability + clipping guard */
@media(max-width:800px){
  /* Tap-opened menus/sheets keep full labels readable instead of clipping them. */
  .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating{
    background:var(--menu,var(--dialog,var(--surface-main)))!important;color:var(--text)!important;border:1px solid var(--line-strong)!important;
  }
  .drive-context-menu button,.drive-selection-more-menu button,.global-context-menu button,.global-context-items button,.work-card-dropdown button,.work-card-dropdown a,.kanban-item-menu button,.chat-context-menu button,.message-context-menu button,.sheet2-context button,.sheet2-menu-pop button,.share-menu button,.drive-new-menu button,.workspace-menu a,.worktrack-new-floating button{
    min-width:0!important;max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;word-break:normal!important;text-align:left!important;line-height:1.35!important;
  }
  .drive-context-menu button>*,.drive-selection-more-menu button>*,.global-context-menu button>*,.global-context-items button>*,.work-card-dropdown button>*,.work-card-dropdown a>*,.kanban-item-menu button>*,.chat-context-menu button>*,.message-context-menu button>*,.sheet2-context button>*,.sheet2-menu-pop button>*,.share-menu button>*,.drive-new-menu button>*,.workspace-menu a>*,.worktrack-new-floating button>*{
    min-width:0!important;max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
  }
  .drive-context-head,.global-context-head,.drive-context-head b,.drive-context-head small,.global-context-head b,.global-context-head small,.kanban-menu-label,.share-menu-title,.share-menu-title b{
    min-width:0!important;max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
  }

  /* Dialog headings, descriptions and rows can wrap; no text is hidden behind fixed actions. */
  dialog:not(.cloud-preview-drawer) h1,dialog:not(.cloud-preview-drawer) h2,dialog:not(.cloud-preview-drawer) h3,
  dialog:not(.cloud-preview-drawer) p,dialog:not(.cloud-preview-drawer) small,dialog:not(.cloud-preview-drawer) label,
  .cloud-share-section-title,.cloud-share-section-title b,.cloud-share-section-title small,.cloud-share-person-name b,.cloud-share-person-name small{
    max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;
  }
  .cloud-share-person,.cloud-share-addrow,.cloud-share-accessrow{min-width:0!important;max-width:100%!important}
  .cloud-share-person{grid-template-columns:30px minmax(0,1fr)!important}
  .cloud-share-person-control{grid-column:2!important;width:100%!important}
  .cloud-share-person-control select{width:100%!important;min-width:0!important}
  .cloud-share-addrow,.cloud-share-accessrow{grid-template-columns:1fr!important}
  .cloud-share-addrow button{grid-column:auto!important}

  /* Spreadsheet option sheets are often opened by tap; allow long option names to wrap. */
  .sheet-option-pop .option-choice>span:last-child,.option-choice>span:last-child{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important}
}


/* 2026-09-29 — final mobile Kanban + glass menu overrides */
@media(max-width:800px){
  .kanban-head{padding-top:calc(58px + env(safe-area-inset-top))!important;min-height:auto!important;border-bottom:1px solid var(--line)!important;background:var(--surface-main)!important}
  .kanban-head>div:first-child p{font-size:11px!important;max-width:none!important}
  .kanban-head-actions{display:flex!important;gap:6px!important;justify-content:flex-end!important}
  .kanban-head-actions button{min-height:44px!important;height:44px!important;padding:0 12px!important;font-size:11.5px!important;border-radius:12px!important}
  .kanban-mobile-tabs{display:flex!important;position:sticky!important;top:0!important;z-index:14!important;gap:8px!important;overflow-x:auto!important;padding:12px 0 6px!important;margin:0 0 8px!important;background:var(--surface-main)!important;scrollbar-width:none!important;overscroll-behavior-x:contain!important}
  .kanban-mobile-tabs button{flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:8px!important;min-height:40px!important;padding:0 12px!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--surface-main)!important;color:var(--muted)!important;font-size:12px!important;font-weight:700!important}
  .kanban-mobile-tabs button small{min-width:22px!important;height:22px!important;padding:0 6px!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:var(--surface-sunken)!important;color:var(--metadata)!important;font-size:10px!important}
  .kanban-mobile-tabs button.active{background:color-mix(in srgb,var(--accent) 10%,var(--surface-main))!important;color:var(--text)!important;border-color:color-mix(in srgb,var(--accent) 22%,var(--line))!important}
  .kanban-mobile-tabs button.active small{background:var(--surface-main)!important;color:var(--text)!important}
  .kanban-board{display:block!important;padding:6px 0 calc(18px + env(safe-area-inset-bottom))!important;overflow:visible!important;min-height:0!important;scroll-snap-type:none!important}
  .kanban-column{display:none!important;width:100%!important;min-width:0!important;margin:0!important;padding:12px!important;border:1px solid var(--line)!important;border-radius:18px!important;background:linear-gradient(180deg,color-mix(in srgb,var(--surface-main) 94%,#f7f8fa),var(--surface-main))!important;box-shadow:0 10px 28px rgba(12,18,24,.06)!important;scroll-snap-align:none!important}
  .kanban-column.mobile-active{display:block!important}
  .kanban-col-head{position:sticky!important;top:56px!important;z-index:7!important;min-height:54px!important;height:auto!important;padding:3px 2px 10px 3px!important;background:linear-gradient(180deg,var(--surface-main) 0%,rgba(255,255,255,.94) 100%)!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;border-bottom:1px solid color-mix(in srgb,var(--line) 78%,transparent)!important}
  .kanban-col-head b{font-size:13.5px!important}
  .kanban-col-actions button{min-width:40px!important;width:40px!important;height:40px!important;min-height:40px!important}
  .kanban-tasks{gap:10px!important}
  .kanban-card,.kanban-card.kanban-selected{padding:12px 12px 12px!important;border-radius:16px!important;background:var(--surface-main)!important;box-shadow:0 8px 22px rgba(15,20,24,.07)!important;touch-action:manipulation!important;border:1px solid color-mix(in srgb,var(--line) 88%,transparent)!important}
  .kanban-card-topline{grid-template-columns:36px minmax(0,1fr) 36px!important;gap:7px!important}
  .kanban-complete-btn,.kanban-task-more{width:36px!important;height:36px!important;min-height:36px!important}
  .kanban-card-title{font-size:13.5px!important;line-height:1.4!important}
  .kanban-card-desc{margin:8px 0 0 0!important;font-size:11.5px!important;line-height:1.45!important;-webkit-line-clamp:4!important}
  .kanban-card-thumbs{gap:6px!important;margin:10px 0 0 0!important}
  .kanban-card-thumb{width:62px!important;min-width:62px!important;height:46px!important}
  .kanban-card-foot{padding-left:0!important;margin-top:10px!important}
  .kanban-add-task{position:sticky!important;bottom:max(8px,env(safe-area-inset-bottom))!important;z-index:8!important;min-height:50px!important;margin-top:10px!important;justify-content:center!important;background:color-mix(in srgb,var(--accent) 7%,var(--surface-main))!important;border:1px solid color-mix(in srgb,var(--accent) 18%,var(--line))!important;border-radius:14px!important;color:var(--text)!important;font-weight:730!important}

  .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating{
    background:rgba(255,255,255,.78)!important;backdrop-filter:blur(24px) saturate(160%)!important;-webkit-backdrop-filter:blur(24px) saturate(160%)!important;border:1px solid rgba(255,255,255,.54)!important;box-shadow:0 18px 48px rgba(9,14,19,.16)!important
  }
  html[data-theme="modern_dark"] .drive-context-menu,html[data-theme="modern_dark"] .drive-selection-more-menu,html[data-theme="modern_dark"] .global-context-menu,html[data-theme="modern_dark"] .work-card-dropdown,html[data-theme="modern_dark"] .kanban-item-menu,html[data-theme="modern_dark"] .chat-context-menu,html[data-theme="modern_dark"] .message-context-menu,html[data-theme="modern_dark"] .sheet-option-pop,html[data-theme="modern_dark"] .sheet2-context,html[data-theme="modern_dark"] .sheet2-menu-pop,html[data-theme="modern_dark"] .share-menu,html[data-theme="modern_dark"] .drive-new-menu,html[data-theme="modern_dark"] html[data-theme="modern_dark"] .workspace-menu,html[data-theme="modern_dark"] .worktrack-new-floating{background:rgba(16,20,26,.82)!important;border-color:rgba(255,255,255,.10)!important;box-shadow:0 18px 48px rgba(0,0,0,.42)!important}
}


/* 2026-09-29 — mobile context menu cleanup */
@media(max-width:800px){
  .drive-context-head,.global-context-head{min-height:44px!important;padding:9px 11px!important}
  .drive-context-head small,.global-context-head small{display:none!important}
  .drive-context-fileicon,#globalContextIcon{display:none!important}
  .drive-context-menu,.global-context-menu,.kanban-item-menu,.work-card-dropdown,.drive-new-menu,.worktrack-new-floating{background:rgba(255,255,255,.70)!important;backdrop-filter:blur(28px) saturate(180%)!important;-webkit-backdrop-filter:blur(28px) saturate(180%)!important;border:1px solid rgba(255,255,255,.48)!important;box-shadow:0 20px 52px rgba(8,12,18,.18)!important}
  html[data-theme="modern_dark"] .drive-context-menu,html[data-theme="modern_dark"] .global-context-menu,html[data-theme="modern_dark"] .kanban-item-menu,html[data-theme="modern_dark"] .work-card-dropdown,html[data-theme="modern_dark"] .drive-new-menu,html[data-theme="modern_dark"] .worktrack-new-floating{background:rgba(15,18,24,.80)!important;border-color:rgba(255,255,255,.08)!important;box-shadow:0 20px 52px rgba(0,0,0,.46)!important}
}


/* 2026-09-29 — frosted context menu v2 mobile final layer */
@media(max-width:800px){
  .drive-context-menu,.global-context-menu,.kanban-item-menu,.work-card-dropdown,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.drive-new-menu,.worktrack-new-floating{
    background:linear-gradient(135deg,rgba(255,255,255,.76),rgba(246,248,250,.62))!important;
    backdrop-filter:blur(22px) saturate(138%)!important;
    -webkit-backdrop-filter:blur(22px) saturate(138%)!important;
    border:1px solid rgba(18,22,26,.09)!important;
    border-radius:17px!important;
    box-shadow:0 12px 30px rgba(18,24,32,.14),0 2px 7px rgba(18,24,32,.08)!important;
  }
  html[data-theme="modern_dark"] .drive-context-menu,html[data-theme="modern_dark"] .global-context-menu,html[data-theme="modern_dark"] .kanban-item-menu,html[data-theme="modern_dark"] .work-card-dropdown,html[data-theme="modern_dark"] .chat-context-menu,html[data-theme="modern_dark"] .message-context-menu,html[data-theme="modern_dark"] .sheet-option-pop,html[data-theme="modern_dark"] .sheet2-context,html[data-theme="modern_dark"] .sheet2-menu-pop,html[data-theme="modern_dark"] .drive-new-menu,html[data-theme="modern_dark"] .worktrack-new-floating{
    background:linear-gradient(135deg,rgba(28,30,34,.78),rgba(19,21,24,.66))!important;
    border-color:rgba(255,255,255,.09)!important;
    box-shadow:0 14px 34px rgba(0,0,0,.30),0 2px 7px rgba(0,0,0,.18)!important;
  }
}


/* 2026-09-29 — mobile header collision guard */
@media(max-width:800px){
  body.route-kanban-page .global-top-actions{display:none!important}
  body.route-kanban-page .kanban-head{padding-left:12px!important;padding-right:12px!important;margin-left:-12px!important;margin-right:-12px!important}
}


/* 2026-09-29 — mobile visual hierarchy: same palette, clearer blocks, calmer sheets */
@media(max-width:800px){
  :root{--mobile-block-radius:14px;--mobile-row-radius:11px}

  main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main)>.page-shell{
    padding-left:12px!important;padding-right:12px!important;padding-bottom:calc(24px + env(safe-area-inset-bottom))!important;
  }
  header,.compact-head,.file-header{
    margin-left:-12px!important;margin-right:-12px!important;padding-left:12px!important;padding-right:12px!important;
    border-bottom:1px solid var(--line)!important;background:var(--surface-main)!important;
  }
  header h1,.compact-head h1,.file-header h1{font-size:20px!important;font-weight:720!important;letter-spacing:-.018em!important}
  .compact-head p,.file-header p{margin-top:5px!important;color:var(--metadata)!important;line-height:1.4!important}

  /* Drive: actions read as a toolbar instead of floating controls. */
  .drive-commandbar{
    margin:10px 0 10px!important;padding:8px!important;border:1px solid var(--line)!important;border-radius:var(--mobile-block-radius)!important;
    background:var(--surface-main)!important;overflow:visible!important;
  }
  .drive-view-actions{width:100%!important;display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:wrap!important;margin:0!important}
  .drive-view-actions>*{flex:0 0 auto!important}
  #driveQuickUpload,#driveSelectMode,.drive-new-top{padding:0 11px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--surface-main)!important}
  #driveQuickUpload span,#driveSelectMode span,.drive-new-top span:last-child{display:inline!important;font-size:11.8px!important;font-weight:680!important}
  #driveQuickUpload svg,#driveSelectMode svg{width:16px!important;height:16px!important}
  #driveDownloadAll{border:1px solid var(--line)!important;border-radius:10px!important;background:var(--surface-main)!important}
  .drive-view-toggle-inline{height:44px!important;padding:3px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--surface-main)!important}
  .drive-layout-option{width:38px!important;height:36px!important;min-height:36px!important;border-radius:8px!important}
  .drive-layout-option.active{background:var(--surface-selected)!important;color:var(--text)!important}
  .drive-new-wrap{margin-left:auto!important}
  .drive-new-top{background:var(--primary-control-bg)!important;color:var(--primary-control-text)!important;border-color:var(--primary-control-border)!important}

  .drive-location-toolbar{
    min-height:46px!important;margin:0 0 10px!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:12px!important;
    background:var(--surface-main)!important;
  }
  .drive-location-toolbar .crumbs{min-height:44px!important;align-items:center!important;gap:5px!important}
  .drive-location-toolbar .crumbs a{min-height:34px!important;display:inline-flex!important;align-items:center!important;padding:0 7px!important;border-radius:8px!important;text-decoration:none!important;font-size:12px!important;font-weight:650!important}
  .drive-location-toolbar .crumbs a:active{background:var(--surface-pressed)!important}

  .drive-file-viewport{min-height:calc(100dvh - 230px)!important}
  .drive-item-section{
    margin:0 0 10px!important;border:1px solid var(--line)!important;border-radius:var(--mobile-block-radius)!important;
    background:var(--surface-main)!important;overflow:hidden!important;
  }
  .drive-section-heading{
    min-height:38px!important;height:38px!important;margin:0!important;padding:0 11px!important;border-bottom:1px solid var(--line)!important;
    background:var(--surface-main)!important;color:var(--text)!important;font-size:12.5px!important;font-weight:720!important;
  }
  .drive-section-heading small{margin-left:2px!important;color:var(--metadata)!important;font-size:10.5px!important;font-weight:650!important}
  .drive-folder-grid{padding:6px!important;gap:5px!important}
  .drive-files-grid{padding:7px!important;gap:8px!important}
  .filecard.drive-folder-card{
    min-height:62px!important;height:auto!important;padding:8px 52px 8px 8px!important;border:1px solid var(--line)!important;border-radius:var(--mobile-row-radius)!important;
    background:var(--surface-main)!important;
  }
  .filecard.drive-folder-card:active{background:var(--surface-pressed)!important}
  .filecard.file-tile{
    min-height:164px!important;padding:5px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface-main)!important;overflow:hidden!important;
  }
  .filecard.file-tile .preview{border-radius:9px!important;background:var(--surface-sunken)!important}
  .filecard.file-tile .file-meta-row{padding:8px 48px 6px 5px!important}
  .filecard .fileinfo b,.filecard .file-name{font-size:12.4px!important;font-weight:690!important;line-height:1.28!important}
  .filecard .fileinfo small{font-size:10.4px!important;line-height:1.3!important;color:var(--metadata)!important}
  .drive-more-btn{
    border:1px solid var(--line)!important;background:color-mix(in srgb,var(--surface-main) 94%,transparent)!important;color:var(--muted)!important;
  }
  .drive-folder-select{border-radius:9px!important}
  .filecard.drive-selected,.filecard.selected{background:var(--surface-selected)!important;box-shadow:inset 0 0 0 1px var(--line-strong)!important}
  .empty{min-height:170px!important;margin:7px!important;padding:22px 14px!important;border:1px dashed var(--line-strong)!important;border-radius:13px!important;background:var(--surface-main)!important;text-align:center!important}
  .empty strong{font-size:13.5px!important}

  /* List view keeps the same block, with thin row separators. */
  .gallery.list-view .drive-folder-grid,.gallery.list-view .drive-files-grid,#driveDropTarget.list-view .drive-folder-grid,#driveDropTarget.list-view .drive-files-grid{padding:0 6px 6px!important}
  .gallery.list-view .filecard,#driveDropTarget.list-view .filecard{
    min-height:58px!important;height:58px!important;padding:0 4px!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;
  }
  .gallery.list-view .filecard:last-child,#driveDropTarget.list-view .filecard:last-child{border-bottom:0!important}
  .gallery.list-view .filecard:active,#driveDropTarget.list-view .filecard:active{background:var(--surface-pressed)!important}

  /* Shared visual language for sparse mobile pages: visible sections, no heavy cards. */
  .panelcard,.security-panel,.appearance-section,.usercard,.theme-card,.app-card,.vault-card,.scheduled-item,.share-center-row,.trash-policy{
    border:1px solid var(--line)!important;border-radius:var(--mobile-block-radius)!important;background:var(--surface-main)!important;box-shadow:none!important;
  }
  .usercard,.theme-card,.app-card,.vault-card,.scheduled-item,.share-center-row{padding:12px!important}
  .sidebar-nav a,.sidebar-nav button,.sidebar-bottom a,.sidebar-bottom button{border-radius:10px!important}
  .sidebar-nav a:active,.sidebar-nav button:active,.sidebar-bottom a:active,.sidebar-bottom button:active{background:var(--surface-pressed)!important}

  /* Bottom sheets/dialogs: less black overlay, clear surface and row structure. */
  .mobile-action-scrim{background:rgba(0,0,0,.16)!important;backdrop-filter:blur(1.5px)!important;-webkit-backdrop-filter:blur(1.5px)!important}
  html[data-theme="modern_dark"] .mobile-action-scrim{background:rgba(0,0,0,.26)!important}
  dialog::backdrop{background:rgba(0,0,0,.18)!important;backdrop-filter:blur(2px)!important;-webkit-backdrop-filter:blur(2px)!important}
  html[data-theme="modern_dark"] dialog::backdrop{background:rgba(0,0,0,.30)!important}
  dialog:not(.cloud-preview-drawer):not(.wt-mobile-row-dialog){
    border:1px solid var(--line-strong)!important;background:var(--dialog)!important;box-shadow:0 14px 38px rgba(0,0,0,.18)!important;
  }
  .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating{
    background:color-mix(in srgb,var(--menu) 91%,transparent)!important;border:1px solid var(--line-strong)!important;
    box-shadow:0 12px 32px rgba(0,0,0,.16)!important;backdrop-filter:blur(22px) saturate(132%)!important;-webkit-backdrop-filter:blur(22px) saturate(132%)!important;
  }
  .drive-context-menu button,.drive-selection-more-menu button,.global-context-menu button,.global-context-items button,.work-card-dropdown button,.work-card-dropdown a,.kanban-item-menu button,.chat-context-menu button,.message-context-menu button,.sheet2-context button,.sheet2-menu-pop button,.share-menu button,.drive-new-menu button,.workspace-menu a,.worktrack-new-floating button{
    min-height:46px!important;padding:0 12px!important;border-radius:10px!important;border:1px solid transparent!important;background:transparent!important;font-weight:620!important;
  }
  .drive-context-menu button:active,.drive-selection-more-menu button:active,.global-context-menu button:active,.global-context-items button:active,.work-card-dropdown button:active,.work-card-dropdown a:active,.kanban-item-menu button:active,.chat-context-menu button:active,.message-context-menu button:active,.sheet2-context button:active,.sheet2-menu-pop button:active,.share-menu button:active,.drive-new-menu button:active,.global-top-menu button:active,.global-top-menu a:active,.workspace-menu a:active,.worktrack-new-floating button:active{
    background:var(--surface-pressed)!important;border-color:var(--line)!important;
  }
  .menu-sep,.context-sep,.worktrack-new-sep{margin:5px 8px!important;background:var(--line)!important}
  dialog .modal-actions{margin-top:4px!important;border-top:1px solid var(--line)!important;background:var(--dialog)!important}
  dialog input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),dialog select,dialog textarea{
    width:100%!important;border:1px solid var(--input-line)!important;border-radius:10px!important;background:var(--input)!important;color:var(--text)!important;
  }
}
@media (hover:hover) and (max-width:800px){
  .filecard.drive-folder-card:hover,.filecard.file-tile:hover,.usercard:hover,.theme-card:hover,.app-card:hover,.vault-card:hover,.scheduled-item:hover,.share-center-row:hover{background:var(--surface-hover)!important}
  .drive-location-toolbar .crumbs a:hover,.sidebar-nav a:hover,.sidebar-nav button:hover,.sidebar-bottom a:hover,.sidebar-bottom button:hover{background:var(--surface-hover)!important}
  .drive-context-menu button:hover,.drive-selection-more-menu button:hover,.global-context-menu button:hover,.global-context-items button:hover,.work-card-dropdown button:hover,.work-card-dropdown a:hover,.kanban-item-menu button:hover,.chat-context-menu button:hover,.message-context-menu button:hover,.sheet2-context button:hover,.sheet2-menu-pop button:hover,.share-menu button:hover,.drive-new-menu button:hover,.global-top-menu button:hover,.global-top-menu a:hover,.workspace-menu a:hover,.worktrack-new-floating button:hover{
    background:var(--surface-hover)!important;border-color:var(--line)!important;
  }
}
@media(max-width:389px){
  .drive-commandbar{padding:7px!important}
  #driveQuickUpload,#driveSelectMode,.drive-new-top{padding:0 9px!important}
  #driveQuickUpload span,#driveSelectMode span,.drive-new-top span:last-child{font-size:11px!important}
  .drive-new-wrap{margin-left:0!important}
}


/* 2026-09-29 — mobile soft screen transitions, no scale/pop */
@media(max-width:800px){
  .mobile-route-veil{position:fixed;inset:0;z-index:2147483000;pointer-events:none;background:var(--page-surface,var(--surface-main));opacity:0;transition:opacity .09s ease-out}
  body.mobile-route-leaving .mobile-route-veil{opacity:1}
  .cloud-preview-drawer{display:flex!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;transition:opacity .14s ease-out,visibility 0s linear .14s!important;transform:none!important}
  .cloud-preview-drawer.open{visibility:visible!important;opacity:1!important;pointer-events:auto!important;transition-delay:0s!important}
  dialog[open]:not(.cloud-preview-drawer){animation:mobileDialogSoftIn .12s ease-out both!important}
  .drive-context-menu:not([hidden]),.drive-selection-more-menu:not([hidden]),.global-context-menu:not([hidden]),.work-card-dropdown:not([hidden]),.kanban-item-menu:not([hidden]),.chat-context-menu:not([hidden]),.message-context-menu:not([hidden]),.sheet-option-pop:not([hidden]),.sheet2-context:not([hidden]),.sheet2-menu-pop:not([hidden]),.share-menu:not([hidden]),.drive-new-menu:not([hidden]),.global-top-menu:not([hidden]),.workspace-menu:not([hidden]),.worktrack-new-floating:not([hidden]){animation:mobileMenuSoftIn .10s ease-out both!important}
}
@keyframes mobileDialogSoftIn{from{opacity:.72}to{opacity:1}}
@keyframes mobileMenuSoftIn{from{opacity:.74}to{opacity:1}}
@media(max-width:800px) and (prefers-reduced-motion:reduce){
  .mobile-route-veil,.cloud-preview-drawer{transition:none!important}
  dialog[open]:not(.cloud-preview-drawer),.drive-context-menu:not([hidden]),.drive-selection-more-menu:not([hidden]),.global-context-menu:not([hidden]),.work-card-dropdown:not([hidden]),.kanban-item-menu:not([hidden]),.chat-context-menu:not([hidden]),.message-context-menu:not([hidden]),.sheet-option-pop:not([hidden]),.sheet2-context:not([hidden]),.sheet2-menu-pop:not([hidden]),.share-menu:not([hidden]),.drive-new-menu:not([hidden]),.global-top-menu:not([hidden]),.workspace-menu:not([hidden]),.worktrack-new-floating:not([hidden]){animation:none!important}
}


/* 2026-09-29 — mobile tonal surfaces + reliable 3-dot sheets v5
   Keep the existing palette, but separate hierarchy with tone-on-tone surfaces
   instead of drawing a border around every block. Mobile action sheets are
   deliberately opaque: backdrop blur caused fuzzy/composited, untappable menus
   on some mobile browsers. */
@media(max-width:800px){
  :root{
    --mobile-tone-shell:#FFFFFF;
    --mobile-tone-block:#F6F6F4;
    --mobile-tone-block-2:#EEEEEB;
    --mobile-tone-raised:#FFFFFF;
    --mobile-tone-hover:#ECECEA;
  }
  html[data-theme="modern_dark"]{
    --mobile-tone-shell:#1A1C1D;
    --mobile-tone-block:#202224;
    --mobile-tone-block-2:#25282A;
    --mobile-tone-raised:#1D1F20;
    --mobile-tone-hover:#2A2D2F;
  }

  html,body,main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main),
  main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main)>.page-shell{
    background:var(--mobile-tone-shell)!important;
  }

  /* Main navigation and Drive hierarchy: white shell + off-white blocks in light,
     equivalent near-black tonal steps in dark. */
  header,.compact-head,.file-header{border-bottom:0!important;background:var(--mobile-tone-shell)!important}
  .drive-commandbar,.drive-location-toolbar{
    border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important;
  }
  #driveQuickUpload,#driveSelectMode,#driveDownloadAll,.drive-view-toggle-inline{
    border:0!important;background:var(--mobile-tone-raised)!important;box-shadow:none!important;
  }
  .drive-layout-option{border:0!important;background:transparent!important}
  .drive-layout-option.active{background:var(--mobile-tone-block-2)!important}
  .drive-new-top{border:0!important;box-shadow:none!important}
  .drive-location-toolbar .crumbs a:active{background:var(--mobile-tone-block-2)!important}

  .drive-item-section{
    border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important;overflow:hidden!important;
  }
  .drive-section-heading{
    border-bottom:0!important;background:var(--mobile-tone-block-2)!important;
  }
  .filecard.drive-folder-card,.filecard.file-tile{
    border:0!important;background:var(--mobile-tone-raised)!important;box-shadow:none!important;
  }
  .filecard.file-tile .preview{background:var(--mobile-tone-block)!important}
  .drive-more-btn,.message-more,.chat-row-menu,.kanban-task-more,.kanban-col-more,.work-card-more{
    border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  .drive-more-btn:active,.message-more:active,.chat-row-menu:active,.kanban-task-more:active,.kanban-col-more:active,.work-card-more:active{
    background:var(--mobile-tone-block-2)!important;
  }
  .filecard.drive-selected,.filecard.selected{
    background:var(--surface-selected)!important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 28%,transparent)!important;
  }
  .empty{border:0!important;background:var(--mobile-tone-block)!important}

  /* List mode uses small tonal rows rather than divider strokes. */
  .gallery.list-view .drive-folder-grid,.gallery.list-view .drive-files-grid,
  #driveDropTarget.list-view .drive-folder-grid,#driveDropTarget.list-view .drive-files-grid{
    padding:6px!important;gap:3px!important;
  }
  .gallery.list-view .filecard,#driveDropTarget.list-view .filecard{
    border:0!important;border-radius:9px!important;background:var(--mobile-tone-raised)!important;
  }
  .gallery.list-view .filecard:active,#driveDropTarget.list-view .filecard:active{background:var(--mobile-tone-hover)!important}

  /* Sparse pages: group content by tone. Reserve strokes for actual inputs/focus. */
  .panelcard,.security-panel,.appearance-section,.usercard,.theme-card,.app-card,.vault-card,.scheduled-item,.share-center-row,.trash-policy,.trash-bulkbar{
    border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important;
  }
  .trash-entry,.chat-row{border:0!important;background:var(--mobile-tone-raised)!important}
  .messenger,.messenger-v5,.messenger-v6,.messenger-v7{border-top:0!important}
  .chat-sidebar{border:0!important;background:var(--mobile-tone-block)!important}
  .mobile-chat-switch,.composer-main{border:0!important;background:var(--mobile-tone-block)!important}

  /* Kanban follows the same tonal ladder; no glass, stripe or card-outline noise. */
  .kanban-head{border-bottom:0!important;background:var(--mobile-tone-shell)!important}
  .kanban-mobile-tabs{background:var(--mobile-tone-shell)!important}
  .kanban-mobile-tabs button{border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important}
  .kanban-mobile-tabs button.active{border:0!important;background:var(--mobile-tone-block-2)!important}
  .kanban-column{border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important}
  .kanban-col-head{border-bottom:0!important;background:var(--mobile-tone-block)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .kanban-card,.kanban-card.kanban-selected{border:0!important;background:var(--mobile-tone-raised)!important;box-shadow:none!important}
  .kanban-add-task{border:0!important;background:var(--mobile-tone-block-2)!important;box-shadow:none!important}

  /* Work Tracking cards are intentionally flat; the surrounding tonal group does the separation. */
  .work-head{border-bottom:0!important}
  .work-grid,.wtrash-grid{gap:6px!important}
  .work-card{border:0!important;background:var(--mobile-tone-block)!important;box-shadow:none!important}
  .work-card:active{background:var(--mobile-tone-block-2)!important}

  /* Reliable mobile 3-dot/action sheets.
     No backdrop-filter here: it creates fuzzy text and can produce a separate
     compositing layer that intercepts taps on iOS/Android WebView variants. */
  .mobile-action-scrim{
    z-index:5900!important;background:rgba(0,0,0,.14)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  html[data-theme="modern_dark"] .mobile-action-scrim{background:rgba(0,0,0,.28)!important}
  .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,
  .chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,
  .drive-new-menu,.workspace-menu,.worktrack-new-floating,.global-more-menu{
    z-index:6100!important;
    opacity:1!important;visibility:visible;
    background:var(--mobile-tone-raised)!important;
    border:0!important;
    box-shadow:0 14px 34px rgba(0,0,0,.16)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;filter:none!important;
    transform:none!important;isolation:isolate;
    pointer-events:auto!important;
  }
  html[data-theme="modern_dark"] .drive-context-menu,html[data-theme="modern_dark"] .drive-selection-more-menu,
  html[data-theme="modern_dark"] .global-context-menu,html[data-theme="modern_dark"] .work-card-dropdown,
  html[data-theme="modern_dark"] .kanban-item-menu,html[data-theme="modern_dark"] .chat-context-menu,
  html[data-theme="modern_dark"] .message-context-menu,html[data-theme="modern_dark"] .sheet-option-pop,
  html[data-theme="modern_dark"] .sheet2-context,html[data-theme="modern_dark"] .sheet2-menu-pop,
  html[data-theme="modern_dark"] .share-menu,html[data-theme="modern_dark"] .drive-new-menu,
  html[data-theme="modern_dark"] html[data-theme="modern_dark"] .workspace-menu,
  html[data-theme="modern_dark"] .worktrack-new-floating,html[data-theme="modern_dark"] .global-more-menu{
    background:#222426!important;box-shadow:0 16px 38px rgba(0,0,0,.30)!important;
  }
  .drive-context-menu button,.drive-selection-more-menu button,.global-context-menu button,.global-context-items button,
  .work-card-dropdown button,.work-card-dropdown a,.kanban-item-menu button,.chat-context-menu button,.message-context-menu button,
  .sheet-option-pop button,.sheet2-context button,.sheet2-menu-pop button,.share-menu button,.drive-new-menu button,
  .workspace-menu a,.worktrack-new-floating button,.global-more-menu button,.global-more-menu a{
    border:0!important;background:transparent!important;box-shadow:none!important;opacity:1!important;filter:none!important;pointer-events:auto!important;
  }
  .drive-context-menu button:active,.drive-selection-more-menu button:active,.global-context-menu button:active,.global-context-items button:active,
  .work-card-dropdown button:active,.work-card-dropdown a:active,.kanban-item-menu button:active,.chat-context-menu button:active,.message-context-menu button:active,
  .sheet-option-pop button:active,.sheet2-context button:active,.sheet2-menu-pop button:active,.share-menu button:active,.drive-new-menu button:active,
  .global-top-menu button:active,.global-top-menu a:active,.workspace-menu a:active,.worktrack-new-floating button:active,.global-more-menu button:active,.global-more-menu a:active{
    border:0!important;background:var(--mobile-tone-block-2)!important;
  }
  .menu-sep,.context-sep,.worktrack-new-sep,.global-top-menu-sep,.kanban-menu-sep{
    background:color-mix(in srgb,var(--text) 9%,transparent)!important;margin:5px 9px!important;
  }
  /* The public-share screen has its own legacy overlay; when it is embedded in
     the main mobile shell, never let that overlay sit above the canonical sheet. */
  body.share-menu-open::before{pointer-events:none!important}

  dialog:not(.cloud-preview-drawer):not(.wt-mobile-row-dialog){
    border:0!important;background:var(--mobile-tone-raised)!important;box-shadow:0 14px 34px rgba(0,0,0,.18)!important;
  }
  dialog .modal-actions{border-top:0!important;background:var(--mobile-tone-block)!important}
}

@media (hover:hover) and (max-width:800px){
  .filecard.drive-folder-card:hover,.filecard.file-tile:hover,.usercard:hover,.theme-card:hover,.app-card:hover,.vault-card:hover,.scheduled-item:hover,.share-center-row:hover,
  .drive-context-menu button:hover,.drive-selection-more-menu button:hover,.global-context-menu button:hover,.global-context-items button:hover,
  .work-card-dropdown button:hover,.work-card-dropdown a:hover,.kanban-item-menu button:hover,.chat-context-menu button:hover,.message-context-menu button:hover,
  .sheet-option-pop button:hover,.sheet2-context button:hover,.sheet2-menu-pop button:hover,.share-menu button:hover,.drive-new-menu button:hover,
  .global-top-menu button:hover,.global-top-menu a:hover,.workspace-menu a:hover,.worktrack-new-floating button:hover{
    border-color:transparent!important;background:var(--mobile-tone-hover)!important;
  }
}


/* 2026-09-29 — mobile Drive sort: tonal, compact, no blur/pop effect */
@media(max-width:800px){
  .drive-sort-button{flex:0 0 auto!important;border:0!important;background:var(--mobile-tone-raised,var(--surface-raised))!important;box-shadow:none!important}
  .drive-sort-menu{left:10px!important;right:10px!important;top:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;width:auto!important;max-height:min(72dvh,520px)!important;overflow:auto!important;padding:9px!important;border:0!important;border-radius:16px!important;background:var(--mobile-tone-block,var(--menu))!important;box-shadow:0 10px 34px rgba(0,0,0,.18)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;animation:none!important;transform:none!important}
  html[data-theme="modern_dark"] .drive-sort-menu{box-shadow:0 12px 38px rgba(0,0,0,.36)!important}
  .drive-sort-menu-head{padding:7px 7px 10px!important}.drive-sort-menu-head>button{background:var(--mobile-tone-raised,var(--surface-raised))!important}
  .drive-sort-options{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important}.drive-sort-options button{min-height:46px!important;height:auto!important;padding:9px 10px!important;border:0!important;background:var(--mobile-tone-raised,var(--surface-raised))!important;border-radius:11px!important}.drive-sort-options button.active{background:var(--mobile-tone-block-2,var(--surface-selected))!important}
  .drive-sort-direction{gap:5px!important;border-top:0!important;margin-top:6px!important;padding-top:0!important}.drive-sort-direction button{min-height:44px!important;height:auto!important;padding:8px!important;background:var(--mobile-tone-raised,var(--surface-raised))!important}.drive-sort-direction button.active{background:var(--mobile-tone-block-2,var(--surface-selected))!important}
  .drive-sort-hint{padding:9px 6px 3px!important}.drive-list-header .drive-sort-header{display:none!important}
  .filecard:hover .fileinfo b,.filecard:hover .drive-list-name b{color:var(--text)!important}.filecard:hover .fileinfo small,.filecard:hover .drive-list-name small{color:var(--metadata)!important}
}


/* 2026-09-29 — mobile sort tab clarity + softer transitions */
@media (max-width:800px){
  .drive-sort-tab{min-width:142px!important;max-width:calc(100vw - 172px)!important;padding:0 10px!important;justify-content:flex-start!important}
  .drive-sort-tab svg{flex:0 0 auto!important}
  .drive-sort-tab-copy{display:grid!important;gap:1px!important;min-width:0!important}
  .drive-sort-tab-copy strong{font-size:11.8px!important;font-weight:700!important}
  .drive-sort-tab-copy small{display:block!important;font-size:9.8px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:var(--metadata)!important}
  .drive-sort-menu{left:10px!important;right:10px!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:auto!important;padding:10px!important;border-radius:18px!important}
  .drive-sort-current{padding:10px 11px!important;border-radius:12px!important}
  .drive-sort-options button{min-height:48px!important;font-size:14px!important}
  .drive-sort-direction{grid-template-columns:1fr!important;gap:6px!important}
  .drive-sort-direction button{min-height:46px!important;font-size:13.2px!important}
  .gallery.list-view .drive-item-section,.gallery.list-view .drive-folder-grid,.gallery.list-view .drive-files-grid,#driveDropTarget.list-view .drive-item-section,#driveDropTarget.list-view .drive-folder-grid,#driveDropTarget.list-view .drive-files-grid{background:transparent!important}
  .gallery.list-view .filecard,#driveDropTarget.list-view .filecard{min-height:60px!important;height:60px!important;border-radius:12px!important;background:var(--mobile-tone-raised)!important}
  .gallery.list-view .filecard:hover,#driveDropTarget.list-view .filecard:hover{background:var(--mobile-tone-block)!important}
  .gallery.list-view .filecard .preview,#driveDropTarget.list-view .filecard .preview,.gallery.list-view .filecard .drive-folder-select,#driveDropTarget.list-view .filecard .drive-folder-select{background:var(--mobile-tone-block)!important;border-radius:10px!important}
  dialog[open]:not(.cloud-preview-drawer),.drive-context-menu:not([hidden]),.drive-selection-more-menu:not([hidden]),.global-context-menu:not([hidden]),.work-card-dropdown:not([hidden]),.kanban-item-menu:not([hidden]),.chat-context-menu:not([hidden]),.message-context-menu:not([hidden]),.sheet-option-pop:not([hidden]),.sheet2-context:not([hidden]),.sheet2-menu-pop:not([hidden]),.share-menu:not([hidden]),.drive-new-menu:not([hidden]),.global-top-menu:not([hidden]),.workspace-menu:not([hidden]),.worktrack-new-floating:not([hidden]),.drive-sort-menu:not([hidden]),.cloud-preview-drawer.open{transform:none!important;animation:none!important}
  .mobile-route-veil{transition:opacity .14s ease-out!important}
  .shade,.app-sidebar,.cloud-preview-drawer,.page-shell,.filecard,.drive-item-section,.drive-folder-grid,.drive-files-grid,.drive-sort-menu,.drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating,dialog{transition-property:opacity,background-color,color,border-color,box-shadow!important;transition-duration:.14s!important;transform:none!important}
}

/* 2026-09-29 — mobile drawer close target + list regression fix */
@media(max-width:800px){
  .shade{z-index:71!important;inset:0!important}
  .menu-open .shade{opacity:1!important;pointer-events:auto!important;touch-action:none!important}
  .app-sidebar{z-index:72!important}
  .gallery.list-view .drive-folder-grid,.gallery.list-view .drive-files-grid,
  #driveDropTarget.list-view .drive-folder-grid,#driveDropTarget.list-view .drive-files-grid{
    display:block!important;grid-template-columns:none!important;gap:0!important;padding:0!important;background:transparent!important;
  }
  .gallery.list-view .filecard,#driveDropTarget.list-view .filecard{
    display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;
    width:100%!important;height:60px!important;min-height:60px!important;margin:0 0 5px!important;padding:0 5px!important;
    border:0!important;border-radius:12px!important;background:var(--mobile-tone-raised)!important;
  }
  .gallery.list-view .filecard:hover,#driveDropTarget.list-view .filecard:hover{background:var(--mobile-tone-block)!important}
  .gallery.list-view .drive-list-name,#driveDropTarget.list-view .drive-list-name{padding:0 8px!important}
  .gallery.list-view .drive-list-name b,#driveDropTarget.list-view .drive-list-name b{font-size:13px!important;line-height:1.25!important}
  .gallery.list-view .drive-more-btn,#driveDropTarget.list-view .drive-more-btn{grid-column:3!important;position:static!important;place-self:center!important}
  .gallery.list-view .drive-kind-tile,#driveDropTarget.list-view .drive-kind-tile{width:34px!important;height:34px!important}
}

/* Sidebar is the one mobile surface that intentionally translates; restore its stable drawer motion. */
@media(max-width:800px){
  .app-sidebar{
    transform:translate3d(-105%,0,0)!important;
    transition:transform .16s ease-out!important;
    will-change:transform;
  }
  body.menu-open .app-sidebar{transform:translate3d(0,0,0)!important}
  body:not(.menu-open) .shade{opacity:0!important;pointer-events:none!important}
}

/* 2026-09-29 — final mobile sort + list row regression guard */
@media(max-width:800px){
  .drive-sort-menu{
    left:10px!important;right:10px!important;top:auto!important;bottom:max(10px,env(safe-area-inset-bottom))!important;
    width:auto!important;max-height:min(70dvh,470px)!important;overflow:auto!important;
    padding:8px!important;border:0!important;border-radius:16px!important;
    background:var(--mobile-tone-block,var(--menu))!important;box-shadow:0 12px 34px rgba(0,0,0,.22)!important;
  }
  .drive-sort-menu-head{min-height:48px!important;padding:5px 6px 8px!important}
  .drive-sort-menu-head b{font-size:14px!important}
  .drive-sort-menu-head small{font-size:10.5px!important;max-width:calc(100vw - 96px)!important}
  .drive-sort-menu-head>button{width:38px!important;height:38px!important;min-height:38px!important;background:var(--mobile-tone-raised,var(--surface-raised))!important}
  .drive-sort-options{grid-template-columns:1fr!important;gap:3px!important;padding:1px 0!important}
  .drive-sort-options button{
    min-height:46px!important;height:46px!important;padding:0 12px!important;border-radius:11px!important;
    background:var(--mobile-tone-raised,var(--surface-raised))!important;font-size:13.5px!important;
  }
  .drive-sort-options button.active{background:var(--mobile-tone-block-2,var(--surface-selected))!important}
  .drive-sort-direction-wrap{gap:6px!important;margin-top:7px!important;padding:8px 0 0!important;border-top:0!important}
  .drive-sort-direction-wrap>span{padding:0 4px!important;font-size:10.5px!important;color:var(--metadata)!important}
  .drive-sort-direction{grid-template-columns:1fr 1fr!important;gap:5px!important}
  .drive-sort-direction button{min-height:42px!important;height:42px!important;border-radius:10px!important;background:var(--mobile-tone-raised,var(--surface-raised))!important;font-size:12px!important}
  .drive-sort-direction button.active{background:var(--mobile-tone-block-2,var(--surface-selected))!important}
  .drive-sort-current,.drive-sort-group-title,.drive-sort-hint{display:none!important}

  /* List mode must stay a compact row; tile preview rules must never leak into it. */
  .gallery.list-view .drive-folder-grid,.gallery.list-view .drive-files-grid,
  #driveDropTarget.list-view .drive-folder-grid,#driveDropTarget.list-view .drive-files-grid{
    display:block!important;grid-template-columns:none!important;grid-auto-rows:auto!important;gap:0!important;padding:0!important;
  }
  .gallery.list-view .filecard,#driveDropTarget.list-view .filecard,
  .gallery.list-view .filecard.file-tile,#driveDropTarget.list-view .filecard.file-tile{
    display:grid!important;grid-template-columns:42px minmax(0,1fr) 42px!important;grid-template-rows:56px!important;
    align-items:center!important;align-content:center!important;
    width:100%!important;height:56px!important;min-height:56px!important;max-height:56px!important;
    margin:0 0 4px!important;padding:0 4px!important;overflow:hidden!important;
    border:0!important;border-radius:12px!important;background:var(--mobile-tone-raised)!important;
  }
  .gallery.list-view .filecard .preview,#driveDropTarget.list-view .filecard .preview,
  .gallery.list-view .filecard.file-tile .preview,#driveDropTarget.list-view .filecard.file-tile .preview,
  .gallery.list-view .filecard .drive-folder-select,#driveDropTarget.list-view .filecard .drive-folder-select{
    grid-column:1!important;grid-row:1!important;
    width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;max-height:36px!important;
    margin:0!important;padding:0!important;place-self:center!important;overflow:hidden!important;border-radius:10px!important;
    background:var(--mobile-tone-block)!important;
  }
  .gallery.list-view .drive-kind-tile,#driveDropTarget.list-view .drive-kind-tile{width:32px!important;height:32px!important;border-radius:9px!important}
  .gallery.list-view .drive-kind-tile svg,#driveDropTarget.list-view .drive-kind-tile svg{width:20px!important;height:20px!important}
  .gallery.list-view .drive-list-name,#driveDropTarget.list-view .drive-list-name{grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;padding:0 8px!important}
  .gallery.list-view .drive-list-name b,#driveDropTarget.list-view .drive-list-name b{font-size:13px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .gallery.list-view .drive-list-name small,#driveDropTarget.list-view .drive-list-name small{display:block!important;margin-top:2px!important;font-size:10.5px!important;line-height:1.2!important;color:var(--metadata)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .gallery.list-view .drive-more-btn,#driveDropTarget.list-view .drive-more-btn{grid-column:3!important;grid-row:1!important;position:static!important;place-self:center!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
  .gallery.list-view .file-meta-row,#driveDropTarget.list-view .file-meta-row,
  .gallery.list-view .drive-list-owner,#driveDropTarget.list-view .drive-list-owner,
  .gallery.list-view .drive-list-kind,#driveDropTarget.list-view .drive-list-kind,
  .gallery.list-view .drive-list-size,#driveDropTarget.list-view .drive-list-size,
  .gallery.list-view .drive-list-date,#driveDropTarget.list-view .drive-list-date{display:none!important}
}

/* 2026-09-29 — mobile sidebar safe-dismiss: modal interaction layer, no click-through */
@media(max-width:800px){
  body.menu-open{overflow:hidden!important;overscroll-behavior:none!important}
  body.menu-open .shade{
    display:block!important;position:fixed!important;inset:0!important;z-index:71!important;
    opacity:1!important;pointer-events:auto!important;touch-action:none!important;
    user-select:none!important;-webkit-user-select:none!important;
  }
  body.menu-open .app-sidebar{z-index:72!important}
  body.menu-open main,body.menu-open .global-top-actions{pointer-events:none!important}
  body.menu-open .app-sidebar,body.menu-open .app-sidebar *{pointer-events:auto!important}
}

/* 2026-09-29 — hard mobile readability guard: dedicated filename copy */
@media(max-width:800px){
  .gallery.list-view .drive-list-name,#driveDropTarget.list-view .drive-list-name{display:none!important}
  .gallery.list-view .mobile-drive-copy,#driveDropTarget.list-view .mobile-drive-copy{
    display:block!important;grid-column:2!important;grid-row:1!important;align-self:center!important;
    min-width:0!important;max-width:100%!important;padding:0 8px!important;margin:0!important;
    opacity:1!important;visibility:visible!important;overflow:hidden!important;
    color:var(--text)!important;pointer-events:none!important;
  }
  .gallery.list-view .mobile-drive-copy b,#driveDropTarget.list-view .mobile-drive-copy b{
    display:block!important;max-width:100%!important;margin:0!important;padding:0!important;
    color:var(--text)!important;opacity:1!important;visibility:visible!important;
    font-size:13px!important;font-weight:690!important;line-height:1.22!important;letter-spacing:-.004em!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    text-shadow:none!important;mix-blend-mode:normal!important;
  }
  .gallery.list-view .mobile-drive-copy small,#driveDropTarget.list-view .mobile-drive-copy small{
    display:block!important;max-width:100%!important;margin:2px 0 0!important;padding:0!important;
    color:var(--metadata)!important;opacity:1!important;visibility:visible!important;
    font-size:10px!important;font-weight:550!important;line-height:1.15!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    text-shadow:none!important;mix-blend-mode:normal!important;
  }
  html[data-theme="modern_dark"] .gallery.list-view .mobile-drive-copy b,
  html[data-theme="modern_dark"] #driveDropTarget.list-view .mobile-drive-copy b{color:#fff!important}
  html[data-theme="modern_dark"] .gallery.list-view .mobile-drive-copy small,
  html[data-theme="modern_dark"] #driveDropTarget.list-view .mobile-drive-copy small{color:#cfcfcf!important}
  html[data-theme="modern_light"] .gallery.list-view .mobile-drive-copy b,
  html[data-theme="modern_light"] #driveDropTarget.list-view .mobile-drive-copy b{color:#000!important}
  html[data-theme="modern_light"] .gallery.list-view .mobile-drive-copy small,
  html[data-theme="modern_light"] #driveDropTarget.list-view .mobile-drive-copy small{color:#444!important}
}


/* 2026-09-29 — mobile navigation flash guard v2
   Keep the current document painted until native navigation swaps it. The legacy
   route veil is intentionally disabled; it was the source of the full-screen pop. */
@media(max-width:800px){
  .mobile-route-veil{display:none!important;opacity:0!important;transition:none!important;animation:none!important}
  body.mobile-route-leaving .mobile-route-veil{display:none!important;opacity:0!important}
  html,body{background:var(--page-surface,var(--surface-main))!important}
  /* v21: native route swap stays fully painted; page-wide enter animation is disabled. */
  main>.page-shell{animation:none!important;transform:none!important;opacity:1!important}
  /* Child content still avoids unrelated route-wide animations. */
  .page-shell>*,main>*,header,.compact-head,.file-header,.drive-commandbar,.file-toolbar,
  .drive-file-viewport,.work-grid,.kanban-board,.messenger,.analysis-shell,.trash-main-list{
    animation-name:none!important;
  }
}

/* ========================================================================== 
   2026-09-29 — MOBILE APPLICATION UI FOUNDATION v2
   Nested applications, tabs, dialogs and bottom layers stay predictable on
   touch screens. Desktop/backend behavior remains unchanged.
   ========================================================================== */
@media(max-width:800px){
  .route-applications .page-shell,.route-video-editor-page .page-shell,.route-automations-page .page-shell,
  .route-browser-ai-page .page-shell,.route-mail .page-shell,.route-text-editor .page-shell,.route-table-editor .page-shell{
    padding:0 10px calc(20px + env(safe-area-inset-bottom))!important;
  }
  .route-applications .apps-head,.route-video-editor-page .ve-head,.route-automations-page .auto-head,
  .route-browser-ai-page .brain-top,.route-mail .mail-head,.route-text-editor .text-editor-header,.route-table-editor .file-header{
    min-height:104px!important;margin:0 -10px 10px!important;padding:58px 10px 12px!important;border-bottom:1px solid var(--line)!important;
    align-items:flex-end!important;
  }
  .route-applications h1,.route-video-editor-page h1,.route-automations-page h1,.route-browser-ai-page h1,.route-mail h1,.route-text-editor h1,.route-table-editor h1{font-size:20px!important}
  .ve-head,.auto-head,.brain-top{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .route-applications .apps-head> :last-child,
  .route-video-editor-page .ve-head> :last-child,
  .route-automations-page .auto-head> :last-child,
  .route-browser-ai-page .brain-top> :last-child,
  .route-mail .mail-head> :last-child,
  .route-text-editor .text-editor-header> :last-child,
  .route-table-editor .file-header> :last-child{width:100%;max-width:100%}
  .route-applications .apps-head .primary-btn,
  .route-video-editor-page .ve-head .primary-btn,
  .route-automations-page .auto-head .primary-btn,
  .route-browser-ai-page .brain-top .primary-btn,
  .route-mail .mail-head .primary-btn,
  .route-text-editor .text-editor-header .primary-btn,
  .route-table-editor .file-header .primary-btn,
  .route-applications .apps-head .ghost-btn,
  .route-video-editor-page .ve-head .ghost-btn,
  .route-automations-page .auto-head .ghost-btn,
  .route-browser-ai-page .brain-top .ghost-btn,
  .route-mail .mail-head .ghost-btn,
  .route-text-editor .text-editor-header .ghost-btn,
  .route-table-editor .file-header .ghost-btn{width:100%;justify-content:flex-start}
  .ve-head-actions{width:100%;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:1px}.ve-head-actions>*{flex:0 0 auto}

  .apps-grid{grid-template-columns:1fr!important;gap:7px!important}.app-card{min-height:142px!important;padding:14px!important;border:0!important;background:var(--mobile-tone-raised)!important}.app-card:hover{background:var(--mobile-tone-raised)!important}.app-card .app-meta{padding-top:8px!important}

  .ve-tabs{position:sticky!important;top:0!important;z-index:16!important;margin:0 -10px 10px!important;padding:0 10px!important;min-height:46px!important;background:var(--mobile-tone-shell,var(--surface-main))!important;box-shadow:none!important}.ve-tabs button{height:46px!important;min-height:46px!important;padding:0 11px!important}.ve-tabs button:hover{background:transparent!important}

  .tour-layout,.ai-workspace,.auto-grid,.brain-native-layout,.mail-layout{grid-template-columns:1fr!important;gap:8px!important}.tour-card,.auto-command-card,.auto-main,.auto-side,.brain-side-card,.mail-compose-card,.mail-settings-card{padding:12px!important;border:0!important;border-radius:13px!important;background:var(--mobile-tone-block)!important}.tour-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}.tour-field.wide{grid-column:1/-1!important}.tour-field input,.tour-field select,.tour-field textarea{font-size:16px!important}.tour-actions,.auto-command-actions,.ai-input-actions{align-items:stretch!important;gap:8px!important}.tour-actions span,.auto-command-actions span{align-self:center;flex:1}.source-head{display:grid!important;grid-template-columns:1fr!important;padding:12px!important}.source-actions{overflow-x:auto;flex-wrap:nowrap!important}.source-actions>*{flex:0 0 auto}.source-note{margin:8px 8px 0!important}.html-source-editor{width:calc(100% - 16px)!important;height:58dvh!important;min-height:360px!important;margin:8px!important;padding:11px!important;font-size:12px!important}.ve-runtime-bar{overflow-x:auto!important;flex-wrap:nowrap!important;padding:7px 8px!important}.ve-runtime-bar>*{flex:0 0 auto}.ve-runtime-bar b{margin-right:6px!important}.ve-runtime{height:calc(100dvh - 156px)!important;min-height:500px!important}

  .automation-row{grid-template-columns:36px minmax(0,1fr)!important;gap:9px!important;padding:10px 6px!important;background:var(--mobile-tone-raised)!important;margin-bottom:5px}.automation-actions{grid-column:1/-1;justify-content:flex-end;padding-top:7px;border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent)}.automation-actions button{width:40px!important;height:40px!important;min-height:40px!important}.auto-command-actions{display:grid!important;grid-template-columns:1fr!important}.auto-command-actions button{width:100%}

  .brain-native-main{border:0!important;border-radius:13px!important}.brain-native-toolbar{min-height:52px!important;padding:8px 10px!important;gap:8px!important}.brain-native-actions .ghost-btn{font-size:0!important;width:38px!important;padding:0!important}.brain-native-actions .ghost-btn::after{content:"Kontrol";font-size:10px}.brain-conversation{min-height:calc(100dvh - 360px)!important;max-height:none!important;padding:12px 8px!important}.brain-bubble{max-width:90%!important}.brain-composer{padding:8px!important}.brain-composer textarea{font-size:16px!important}.brain-side-card{background:var(--mobile-tone-block)!important}.brain-login-dialog{width:calc(100vw - 12px)!important;max-width:none!important;max-height:calc(100dvh - 12px)!important;border:0!important;border-radius:16px!important}.brain-login-wrap{max-height:calc(100dvh - 12px)!important}.brain-login-head{padding:12px!important}.brain-login-lite-body,.brain-login-helper,.brain-advanced-login{margin:8px!important;padding:11px!important}.brain-login-helper label>div{grid-template-columns:1fr!important}.brain-login-helper input,.brain-browser-tools input{font-size:16px!important}.brain-browser-frame{max-height:44dvh!important}.brain-browser-tools button{flex:1 0 auto}

  .mail-compose-form input,.mail-compose-form textarea,.mail-settings-form input{font-size:16px!important}.mail-compose-actions{display:grid!important;grid-template-columns:1fr!important}.mail-compose-actions button{width:100%}.text-editor-card{min-height:calc(100dvh - 106px)!important;border:0!important;border-radius:12px!important}.text-editor-toolbar{padding:8px!important;gap:7px!important;flex-wrap:wrap}.editor-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}.editor-actions .primary{grid-column:1/-1}.text-editor-area{min-height:60dvh!important;font-size:16px!important;padding:12px!important}.cloud-table-wrap{border:0!important;border-radius:10px!important;max-width:100%;overflow:auto!important}.cloud-table td,.cloud-table th{min-width:120px!important;height:44px!important;font-size:13px!important}

  /* Every low-level dialog becomes a stable touch sheet, never a tiny floating desktop box. */
  dialog:not(.cloud-preview-drawer):not(.wt-mobile-row-dialog){
    position:fixed!important;left:8px!important;right:8px!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;max-width:none!important;max-height:min(86dvh,720px)!important;margin:0!important;border:0!important;border-radius:16px!important;
    background:var(--mobile-tone-block,var(--dialog))!important;box-shadow:0 16px 46px rgba(0,0,0,.24)!important;overflow:hidden!important;
  }
  dialog:not(.cloud-preview-drawer):not(.wt-mobile-row-dialog)::backdrop{background:rgba(0,0,0,.34)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  dialog:not(.cloud-preview-drawer):not(.wt-mobile-row-dialog)>form{max-height:min(86dvh,720px)!important;padding:12px!important;overflow:auto!important}
  dialog .dialog-head,dialog .mail-dialog-head,dialog .device-lock-head{position:sticky!important;top:-12px!important;z-index:3!important;padding:10px 0 11px!important;background:var(--mobile-tone-block,var(--dialog))!important}
  dialog .dialog-actions,dialog .modal-actions{bottom:-12px!important;margin:4px -12px -12px!important;padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;background:var(--mobile-tone-block,var(--dialog))!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
  dialog .dialog-actions>*:only-child,dialog .modal-actions>*:only-child{grid-column:1/-1}dialog .dialog-actions button,dialog .modal-actions button{min-height:44px!important;height:44px!important}
  dialog input,dialog select,dialog textarea{font-size:16px!important}

  /* Menus use one opaque bottom-sheet model on mobile to avoid blur/click-through bugs. */
  .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,
  .chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,
  .drive-new-menu,.workspace-menu,.worktrack-new-floating,.global-more-menu{
    left:8px!important;right:8px!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;
    max-height:min(72dvh,520px)!important;overflow:auto!important;border:0!important;border-radius:16px!important;padding:8px!important;
    background:var(--mobile-tone-block,var(--menu))!important;box-shadow:0 14px 38px rgba(0,0,0,.24)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  .drive-context-menu button,.drive-selection-more-menu button,.global-context-menu button,.global-context-items button,
  .work-card-dropdown button,.work-card-dropdown a,.kanban-item-menu button,.chat-context-menu button,.message-context-menu button,
  .sheet-option-pop button,.sheet2-context button,.sheet2-menu-pop button,.share-menu button,.drive-new-menu button,
  .workspace-menu a,.worktrack-new-floating button,.global-more-menu button,.global-more-menu a{
    min-height:46px!important;height:46px!important;padding:0 11px!important;border-radius:10px!important;font-size:13.2px!important;background:var(--mobile-tone-raised,var(--surface-raised))!important;
  }
  .drive-context-menu button+button,.drive-selection-more-menu button+button,.global-context-items button+button,
  .work-card-dropdown button+button,.kanban-item-menu button+button,.chat-context-menu button+button,.message-context-menu button+button{margin-top:3px}
}

@media(max-width:460px){
  .tour-grid{grid-template-columns:1fr!important}.tour-field.wide{grid-column:auto!important}.app-card p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.brain-native-identity small{max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* 2026-09-30 — Drive mobile top area density v6.
   Keep the phone header useful instead of tall/empty: compact title row,
   one-line action rail and a slim breadcrumb row. Desktop is untouched. */
@media(max-width:800px){
  body.route-gallery #globalNewAction{display:none!important}

  body.route-gallery .drive-file-header{
    display:flex!important;
    align-items:center!important;
    height:calc(56px + env(safe-area-inset-top))!important;
    min-height:calc(56px + env(safe-area-inset-top))!important;
    max-height:calc(56px + env(safe-area-inset-top))!important;
    margin:0 -12px!important;
    padding:max(8px,env(safe-area-inset-top)) 58px 8px 62px!important;
    box-sizing:border-box!important;
    background:var(--mobile-tone-shell,var(--surface-main))!important;
    border-bottom:1px solid var(--line)!important;
  }
  body.route-gallery .drive-file-header>div{min-width:0!important;display:flex!important;align-items:center!important}
  body.route-gallery .drive-file-header h1{
    margin:0!important;
    font-size:17px!important;
    line-height:1.1!important;
    font-weight:740!important;
    letter-spacing:-.015em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.route-gallery .global-top-actions{
    top:max(10px,env(safe-area-inset-top))!important;
    right:max(10px,env(safe-area-inset-right))!important;
    gap:2px!important;
  }
  body.route-gallery .global-top-action{
    width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
    border-radius:9px!important;
  }

  body.route-gallery .drive-commandbar{
    display:flex!important;
    align-items:center!important;
    min-height:50px!important;
    height:50px!important;
    max-height:50px!important;
    margin:0 -12px 0!important;
    padding:5px 8px!important;
    gap:4px!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    border-radius:0!important;
    background:var(--mobile-tone-block,var(--surface-main))!important;
    scrollbar-width:none!important;
  }
  body.route-gallery .drive-commandbar::-webkit-scrollbar{display:none!important}
  body.route-gallery .drive-global-search-wrap{display:none!important}
  body.route-gallery .drive-view-actions{
    width:max-content!important;
    min-width:max-content!important;
    height:40px!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    gap:4px!important;
    margin:0!important;
    overflow:visible!important;
  }
  body.route-gallery .drive-view-actions>*{flex:0 0 auto!important}

  body.route-gallery #driveQuickUpload,
  body.route-gallery #driveDownloadAll,
  body.route-gallery #driveSelectMode,
  body.route-gallery .drive-sort-tab,
  body.route-gallery .drive-layout-option,
  body.route-gallery .drive-new-top{
    height:40px!important;
    min-height:40px!important;
    border:0!important;
    border-radius:9px!important;
    box-shadow:none!important;
  }
  body.route-gallery #driveDownloadAll,
  body.route-gallery #driveSelectMode,
  body.route-gallery .drive-sort-tab{
    width:40px!important;
    min-width:40px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    background:var(--mobile-tone-raised,var(--surface-raised))!important;
  }
  body.route-gallery #driveQuickUpload,
  body.route-gallery .drive-new-top{
    min-width:auto!important;
    width:auto!important;
    padding:0 10px!important;
    gap:6px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    font-size:11.5px!important;
    font-weight:700!important;
  }
  body.route-gallery #driveQuickUpload{background:var(--mobile-tone-raised,var(--surface-raised))!important}
  body.route-gallery #driveQuickUpload>span,
  body.route-gallery .drive-new-top>span:last-child{display:inline!important;font-size:11.5px!important;font-weight:700!important}
  body.route-gallery #driveSelectMode>span,
  body.route-gallery .drive-sort-tab-copy{display:none!important}
  body.route-gallery #driveQuickUpload svg,
  body.route-gallery #driveDownloadAll svg,
  body.route-gallery #driveSelectMode svg,
  body.route-gallery .drive-sort-tab>svg{
    width:17px!important;height:17px!important;margin:0!important;
  }
  body.route-gallery .drive-new-plus{font-size:18px!important;line-height:1!important}
  body.route-gallery .drive-new-wrap{margin-left:0!important}
  body.route-gallery .drive-new-top{
    background:var(--primary-control-bg)!important;
    color:var(--primary-control-text)!important;
  }

  body.route-gallery .drive-view-toggle-inline{
    height:40px!important;
    min-height:40px!important;
    padding:3px!important;
    gap:2px!important;
    border:0!important;
    border-radius:9px!important;
    background:var(--mobile-tone-raised,var(--surface-raised))!important;
  }
  body.route-gallery .drive-layout-option{
    width:34px!important;
    min-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    padding:0!important;
    background:transparent!important;
  }
  body.route-gallery .drive-layout-option.active{background:var(--mobile-tone-block-2,var(--surface-selected))!important}
  body.route-gallery .drive-layout-option svg{width:16px!important;height:16px!important}

  body.route-gallery .drive-location-toolbar{
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    margin:0 -12px 7px!important;
    padding:0 10px!important;
    border:0!important;
    border-bottom:1px solid var(--line)!important;
    border-radius:0!important;
    background:var(--mobile-tone-shell,var(--surface-main))!important;
    overflow:hidden!important;
  }
  body.route-gallery .drive-location-label{display:none!important}
  body.route-gallery .drive-location-current{width:100%!important;min-width:0!important}
  body.route-gallery .drive-location-toolbar .crumbs{
    width:100%!important;
    min-height:40px!important;
    height:40px!important;
    display:flex!important;
    align-items:center!important;
    gap:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    white-space:nowrap!important;
    scrollbar-width:none!important;
  }
  body.route-gallery .drive-location-toolbar .crumbs::-webkit-scrollbar{display:none!important}
  body.route-gallery .drive-location-toolbar .crumbs a{
    min-height:30px!important;
    height:30px!important;
    padding:0 6px!important;
    border-radius:7px!important;
    font-size:11.5px!important;
    font-weight:660!important;
  }
  body.route-gallery .drive-location-toolbar .crumbs span{font-size:12px!important;color:var(--metadata)!important}
  body.route-gallery .drive-toolbar-meta{display:none!important}
  body.route-gallery .drive-file-viewport{min-height:calc(100dvh - 153px - env(safe-area-inset-top))!important}

  /* Selection mode uses the same dense bar instead of growing a second header. */
  body.route-gallery .drive-toolbar-selection-mode{
    width:max-content!important;
    min-width:max-content!important;
    height:40px!important;
    min-height:40px!important;
    position:static!important;
    gap:4px!important;
    align-items:center!important;
  }
  body.route-gallery .drive-toolbar-selection-count,
  body.route-gallery .drive-toolbar-selection-actions{height:40px!important;align-items:center!important;gap:4px!important}
  body.route-gallery .drive-toolbar-selection-actions button,
  body.route-gallery .drive-toolbar-clear-selection{
    min-height:40px!important;height:40px!important;border-radius:9px!important;
  }
}

@media(max-width:389px){
  body.route-gallery .drive-file-header{padding-right:54px!important;padding-left:60px!important}
  body.route-gallery #driveQuickUpload,
  body.route-gallery .drive-new-top{padding:0 8px!important}
  body.route-gallery #driveQuickUpload>span,
  body.route-gallery .drive-new-top>span:last-child{font-size:11px!important}
}

/* 2026-09-30 — Mobile compact control system v8.
   Final mobile-only normalization layer. It intentionally comes last so older
   feature-specific fragments cannot leave mixed button heights/radii/padding.
   Large menu/sheet rows stay finger friendly; inline/header controls are dense. */
@media(max-width:800px){
  :root{
    --m-control-h:40px;
    --m-icon-h:38px;
    --m-control-r:9px;
    --m-control-gap:5px;
    --m-sheet-h:44px;
  }

  /* Shared visual language for normal inline actions. */
  body:not(.route-login) :is(.primary,.ghost,.danger,.primary-btn,.ghost-btn,.button,a.button,.btn){
    min-height:var(--m-control-h)!important;
    border-radius:var(--m-control-r)!important;
    padding-top:0!important;
    padding-bottom:0!important;
    line-height:1.1!important;
    box-shadow:none!important;
  }
  body:not(.route-login) :is(.primary,.ghost,.danger,.primary-btn,.ghost-btn,.button,a.button,.btn) svg{
    width:16px!important;
    height:16px!important;
    flex:0 0 auto!important;
  }

  /* Icon-only buttons: same box everywhere, no accidental oval/oversized hit box. */
  :is(.icon-btn,.icon-button,.drive-more-btn,.work-card-more,.kanban-task-more,.kanban-col-more,.kanban-add,
      .preview-head-action,.global-top-action,.chat-row-menu,.message-more,.share-message){
    width:var(--m-icon-h)!important;
    min-width:var(--m-icon-h)!important;
    height:var(--m-icon-h)!important;
    min-height:var(--m-icon-h)!important;
    padding:0!important;
    border-radius:var(--m-control-r)!important;
    display:inline-grid!important;
    place-items:center!important;
    box-shadow:none!important;
  }

  /* Header/action groups must stay one compact rail instead of wrapping into tall blocks. */
  :is(.header-actions,.compact-actions,.work-actions,.ve-head-actions,.source-actions,.update-history-actions,
      .preview-actions,.cloud-preview-drawer-actions,.kanban-head-actions){
    gap:var(--m-control-gap)!important;
  }
  :is(.header-actions,.compact-actions,.ve-head-actions,.source-actions){
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch;
  }
  :is(.header-actions,.compact-actions,.ve-head-actions,.source-actions)::-webkit-scrollbar{display:none!important}
  :is(.header-actions,.compact-actions,.ve-head-actions,.source-actions)>*{flex:0 0 auto!important}

  /* Drive: one clean compact action rail. Two primary actions keep labels,
     secondary actions use icons and remain visually identical. */
  body.route-gallery .drive-commandbar{
    min-height:48px!important;
    height:48px!important;
    max-height:48px!important;
    padding:4px 8px!important;
    gap:3px!important;
  }
  body.route-gallery .drive-view-actions{
    height:40px!important;
    gap:3px!important;
  }
  body.route-gallery #driveQuickUpload,
  body.route-gallery #driveDownloadAll,
  body.route-gallery #driveSelectMode,
  body.route-gallery .drive-sort-tab,
  body.route-gallery .drive-new-top{
    min-height:38px!important;
    height:38px!important;
    border-radius:8px!important;
  }
  body.route-gallery #driveDownloadAll,
  body.route-gallery #driveSelectMode,
  body.route-gallery .drive-sort-tab{
    width:38px!important;
    min-width:38px!important;
    padding:0!important;
  }
  body.route-gallery #driveQuickUpload,
  body.route-gallery .drive-new-top{
    padding:0 9px!important;
    gap:5px!important;
  }
  body.route-gallery #driveQuickUpload>span,
  body.route-gallery .drive-new-top>span:last-child{
    font-size:11.4px!important;
    line-height:1!important;
  }
  body.route-gallery .drive-view-toggle-inline{
    height:38px!important;
    min-height:38px!important;
    padding:2px!important;
    border-radius:8px!important;
  }
  body.route-gallery .drive-layout-option{
    width:33px!important;
    min-width:33px!important;
    height:33px!important;
    min-height:33px!important;
    border-radius:7px!important;
  }
  body.route-gallery .drive-toolbar-selection-mode,
  body.route-gallery .drive-toolbar-selection-count,
  body.route-gallery .drive-toolbar-selection-actions{
    height:38px!important;
    min-height:38px!important;
  }
  body.route-gallery .drive-toolbar-selection-actions button,
  body.route-gallery .drive-toolbar-clear-selection{
    height:38px!important;
    min-height:38px!important;
    border-radius:8px!important;
    padding:0 9px!important;
  }

  /* Three-dot and row controls should not dominate list rows. */
  .gallery.list-view .drive-more-btn,
  #driveDropTarget.list-view .drive-more-btn,
  .trash-entry .trash-card-actions button,
  .share-center-row button{
    min-height:38px!important;
  }
  .gallery.list-view .drive-more-btn,
  #driveDropTarget.list-view .drive-more-btn{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
    border:0!important;
    background:transparent!important;
  }

  /* Modal footer actions are compact but remain large enough for touch. */
  dialog .dialog-actions,
  dialog .modal-actions{
    gap:6px!important;
  }
  dialog .dialog-actions button,
  dialog .modal-actions button{
    min-height:42px!important;
    height:42px!important;
    border-radius:9px!important;
    font-size:12.5px!important;
  }

  /* Bottom-sheet/context rows stay 44px and full width; this avoids tiny menu targets. */
  :is(.drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,
      .chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,.share-menu,
      .drive-new-menu,.workspace-menu,.worktrack-new-floating,.global-more-menu) :is(button,a){
    min-height:var(--m-sheet-h)!important;
    height:auto!important;
    border-radius:9px!important;
  }

  /* Prevent button text from creating ugly two-line controls in compact rails. */
  :is(.drive-view-actions,.header-actions,.compact-actions,.ve-head-actions,.source-actions) button,
  :is(.drive-view-actions,.header-actions,.compact-actions,.ve-head-actions,.source-actions) a{
    white-space:nowrap!important;
  }

}

/* Very narrow phones: preserve icons first; only the two core Drive labels remain. */
@media(max-width:360px){
  body.route-gallery #driveQuickUpload,
  body.route-gallery .drive-new-top{padding:0 7px!important}
  body.route-gallery #driveQuickUpload>span,
  body.route-gallery .drive-new-top>span:last-child{font-size:10.8px!important}
  body.route-gallery .drive-view-actions{gap:2px!important}
}


/* 2026-09-30 — v9 mobile list clarity + type placement.
   Light list rows use a real separator; file type lives under the filename,
   never in the three-dot action zone. */
@media(max-width:800px){
  .gallery.list-view .filetype-corner,
  #driveDropTarget.list-view .filetype-corner{display:none!important}

  .gallery.list-view .mobile-drive-copy small,
  #driveDropTarget.list-view .mobile-drive-copy small{
    display:flex!important;align-items:center!important;gap:6px!important;
    min-width:0!important;overflow:hidden!important;
  }
  .gallery.list-view .mobile-drive-type,
  #driveDropTarget.list-view .mobile-drive-type{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    flex:0 0 auto!important;max-width:58px!important;min-height:18px!important;
    padding:1px 6px!important;border-radius:6px!important;
    background:var(--mtb,var(--accent))!important;color:var(--mtf,#fff)!important;
    font-size:9px!important;font-weight:800!important;line-height:16px!important;letter-spacing:.02em!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  .gallery.list-view .mobile-drive-submeta,
  #driveDropTarget.list-view .mobile-drive-submeta{
    min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  }
  .gallery.list-view .drive-more-btn,
  #driveDropTarget.list-view .drive-more-btn{
    z-index:3!important;justify-self:end!important;margin-right:1px!important;
  }

  html[data-theme="modern_light"] body.route-gallery .gallery.list-view .drive-folder-grid,
  html[data-theme="modern_light"] body.route-gallery .gallery.list-view .drive-files-grid,
  html[data-theme="modern_light"] body.route-gallery #driveDropTarget.list-view .drive-folder-grid,
  html[data-theme="modern_light"] body.route-gallery #driveDropTarget.list-view .drive-files-grid{
    padding:0 6px 6px!important;gap:0!important;background:#fff!important;
  }
  html[data-theme="modern_light"] body.route-gallery .gallery.list-view .filecard,
  html[data-theme="modern_light"] body.route-gallery #driveDropTarget.list-view .filecard,
  html[data-theme="modern_light"] body.route-gallery .gallery.list-view .filecard.file-tile,
  html[data-theme="modern_light"] body.route-gallery #driveDropTarget.list-view .filecard.file-tile{
    height:56px!important;min-height:56px!important;max-height:56px!important;grid-template-rows:56px!important;
    margin:0!important;border:0!important;border-bottom:1px solid #DDE1E5!important;border-radius:0!important;
    background:#fff!important;box-shadow:none!important;
  }
  html[data-theme="modern_light"] body.route-gallery .gallery.list-view .filecard:active,
  html[data-theme="modern_light"] body.route-gallery #driveDropTarget.list-view .filecard:active{background:#F4F6F8!important}
  html[data-theme="modern_light"] body.route-gallery .drive-section-heading{
    border-bottom:1px solid #D4D9DE!important;background:#F7F8F9!important;
  }
}


/* 2026-09-30 — v10 mobile Drive anchored context menu.
   Drive's 3-dot menu behaves like a compact desktop context menu at the touched row,
   not like a bottom sheet. Other mobile menus keep their existing sheet behavior. */
@media(max-width:800px){
  body.route-gallery #driveContextMenu.drive-context-menu{
    position:fixed!important;
    right:auto!important;
    bottom:auto!important;
    width:min(218px,calc(100vw - 16px))!important;
    min-width:190px!important;
    max-width:218px!important;
    max-height:min(72dvh,470px)!important;
    overflow:auto!important;
    padding:5px!important;
    border-radius:11px!important;
    box-shadow:0 12px 34px rgba(0,0,0,.24)!important;
    overscroll-behavior:contain!important;
    touch-action:manipulation!important;
    z-index:6100!important;
  }
  body.route-gallery #driveContextMenu .drive-context-head{
    min-height:32px!important;
    padding:5px 8px 6px!important;
    margin:0 0 3px!important;
  }
  body.route-gallery #driveContextMenu .drive-context-head b{
    display:block!important;
    max-width:100%!important;
    font-size:11.5px!important;
    font-weight:720!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.route-gallery #driveContextMenu .drive-context-group{
    display:grid!important;
    gap:1px!important;
  }
  body.route-gallery #driveContextMenu .drive-context-group button{
    width:100%!important;
    min-height:36px!important;
    height:36px!important;
    padding:0 9px!important;
    border-radius:7px!important;
    font-size:12px!important;
    line-height:1!important;
    white-space:nowrap!important;
    touch-action:manipulation!important;
  }
  body.route-gallery #driveContextMenu .drive-context-group button svg{
    width:16px!important;
    height:16px!important;
    flex:0 0 16px!important;
  }
  body.route-gallery #driveContextMenu .drive-context-group button span:not(.drive-folder-color-dot):not(.chev){
    font-size:12px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.route-gallery #driveContextMenu .menu-sep{margin:3px 4px!important}

  /* Mobile list right edge belongs only to the 3-dot action. File type/size stays under filename. */
  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{
    padding:0 10px 0 8px!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy small,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy small{
    display:block!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-filemeta,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-filemeta{
    display:flex!important;
    align-items:center!important;
    gap:4px!important;
    color:var(--metadata)!important;
    background:transparent!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    font-size:10px!important;
    font-weight:560!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-type,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-type{
    display:inline-flex!important;align-items:center!important;flex:0 0 auto!important;
    min-height:0!important;max-width:none!important;padding:0!important;border:0!important;border-radius:0!important;
    background:transparent!important;color:inherit!important;font-size:10px!important;font-weight:700!important;line-height:1.15!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-ext,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-ext{
    flex:0 0 auto!important;
    color:inherit!important;
    background:transparent!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    font-size:10px!important;
    font-weight:700!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-meta-dot,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-meta-dot{opacity:.65!important}
  body.route-gallery .gallery.list-view .drive-more-btn,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn{
    grid-column:3!important;
    justify-self:end!important;
    width:36px!important;
    min-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0!important;
    z-index:5!important;
  }
}

/* 2026-09-30 — v11 mobile Drive: dedicated three-dot action column.
   The right edge belongs only to the row action button. Legacy file-type
   corner/tile badges are suppressed in list mode; type stays in filename meta. */
@media(max-width:800px){
  body.route-gallery .drive-list-header.is-visible,
  body.route-gallery #driveDropTarget.list-view .drive-list-header.is-visible{
    display:none!important;
  }

  body.route-gallery .gallery.list-view,
  body.route-gallery #driveDropTarget.list-view,
  body.route-gallery .gallery.list-view .drive-item-section,
  body.route-gallery #driveDropTarget.list-view .drive-item-section,
  body.route-gallery .gallery.list-view .drive-folder-grid,
  body.route-gallery .gallery.list-view .drive-files-grid,
  body.route-gallery #driveDropTarget.list-view .drive-folder-grid,
  body.route-gallery #driveDropTarget.list-view .drive-files-grid{
    max-width:100%!important;
    overflow-x:hidden!important;
  }

  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard,
  body.route-gallery .gallery.list-view .filecard.file-tile,
  body.route-gallery #driveDropTarget.list-view .filecard.file-tile{
    position:relative!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    grid-template-rows:56px!important;
    width:100%!important;
    min-width:0!important;
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;
    padding:0 50px 0 6px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  body.route-gallery .gallery.list-view .filecard>.preview,
  body.route-gallery #driveDropTarget.list-view .filecard>.preview,
  body.route-gallery .gallery.list-view .filecard>.drive-folder-select,
  body.route-gallery #driveDropTarget.list-view .filecard>.drive-folder-select{
    grid-column:1!important;
    grid-row:1!important;
    place-self:center!important;
    position:relative!important;
    overflow:hidden!important;
  }

  /* Never render a floating type pill inside a mobile list thumbnail. */
  body.route-gallery .gallery.list-view .filetype-corner,
  body.route-gallery #driveDropTarget.list-view .filetype-corner,
  body.route-gallery .gallery.list-view .drive-kind-tile>b,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile>b{
    display:none!important;
  }

  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{
    display:block!important;
    grid-column:2!important;
    grid-row:1!important;
    align-self:center!important;
    min-width:0!important;
    max-width:100%!important;
    padding:0 8px!important;
    overflow:hidden!important;
  }

  body.route-gallery .gallery.list-view .drive-list-name,
  body.route-gallery #driveDropTarget.list-view .drive-list-name,
  body.route-gallery .gallery.list-view .drive-list-owner,
  body.route-gallery #driveDropTarget.list-view .drive-list-owner,
  body.route-gallery .gallery.list-view .drive-list-kind,
  body.route-gallery #driveDropTarget.list-view .drive-list-kind,
  body.route-gallery .gallery.list-view .drive-list-size,
  body.route-gallery #driveDropTarget.list-view .drive-list-size,
  body.route-gallery .gallery.list-view .drive-list-date,
  body.route-gallery #driveDropTarget.list-view .drive-list-date,
  body.route-gallery .gallery.list-view .file-meta-row,
  body.route-gallery #driveDropTarget.list-view .file-meta-row{
    display:none!important;
  }

  /* Dedicated action hit area: no badge or content may share this strip. */
  body.route-gallery .gallery.list-view .drive-more-btn,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn{
    position:absolute!important;
    grid-column:auto!important;
    grid-row:auto!important;
    top:50%!important;
    right:6px!important;
    bottom:auto!important;
    left:auto!important;
    transform:translateY(-50%)!important;
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    z-index:20!important;
    isolation:isolate!important;
    border-radius:9px!important;
    background:var(--mobile-tone-raised,var(--surface-main))!important;
    color:var(--text)!important;
    font-size:20px!important;
    line-height:1!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
  body.route-gallery .gallery.list-view .drive-more-btn:active,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn:active{
    background:var(--mobile-tone-block-2,var(--surface-pressed))!important;
  }

  /* Type/size is text metadata under the filename, never a right-side pill. */
  body.route-gallery .gallery.list-view .mobile-drive-filemeta,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-filemeta,
  body.route-gallery .gallery.list-view .mobile-drive-type,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-type,
  body.route-gallery .gallery.list-view .mobile-drive-ext,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-ext{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    color:var(--metadata)!important;
  }
}



/* 2026-10-02 — mobile list metadata cleanup v13
   Mobile list stays compact: name + size only. Date is removed from the row. */
@media(max-width:800px){
  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard,
  body.route-gallery .gallery.list-view .filecard.file-tile,
  body.route-gallery #driveDropTarget.list-view .filecard.file-tile{
    grid-template-columns:42px minmax(0,1fr) 42px!important;
    grid-template-rows:50px!important;
    height:50px!important;min-height:50px!important;max-height:50px!important;
    padding:0 42px 0 4px!important;
    margin:0 0 2px!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{
    grid-column:2!important;grid-row:1!important;
    align-self:center!important;padding:0 6px!important;
    min-width:0!important;overflow:hidden!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy b,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy b{
    font-size:12.8px!important;font-weight:660!important;line-height:1.16!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy small,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy small{
    display:block!important;margin-top:2px!important;
    font-size:10px!important;font-weight:520!important;line-height:1!important;
    color:var(--metadata)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-date,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-date{
    display:none!important;
  }
  body.route-gallery .gallery.list-view .drive-more-btn,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn{
    right:2px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  }
}
@media(max-width:360px){
  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard{
    grid-template-columns:40px minmax(0,1fr) 40px!important;
    padding-right:40px!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{padding:0 4px!important}
}

/* 2026-10-02 — mobile single-line list v14
   Icon | name | size | menu. No second metadata/date line. */
@media(max-width:800px){
  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard,
  body.route-gallery .gallery.list-view .filecard.file-tile,
  body.route-gallery #driveDropTarget.list-view .filecard.file-tile{
    grid-template-columns:40px minmax(0,1fr) 66px!important;
    grid-template-rows:46px!important;
    height:46px!important;min-height:46px!important;max-height:46px!important;
    padding:0 40px 0 3px!important;
    margin:0 0 1px!important;
  }
  body.route-gallery .gallery.list-view .filecard>.preview,
  body.route-gallery #driveDropTarget.list-view .filecard>.preview,
  body.route-gallery .gallery.list-view .filecard>.drive-folder-select,
  body.route-gallery #driveDropTarget.list-view .filecard>.drive-folder-select{
    width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;max-width:32px!important;max-height:32px!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{
    display:block!important;grid-column:2!important;grid-row:1!important;
    align-self:center!important;padding:0 5px!important;min-width:0!important;overflow:hidden!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy b,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy b{
    display:block!important;font-size:12.8px!important;font-weight:650!important;line-height:1.1!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy small,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy small,
  body.route-gallery .gallery.list-view .mobile-drive-date,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-date{display:none!important}
  body.route-gallery .gallery.list-view .mobile-drive-size,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-size{
    display:block!important;grid-column:3!important;grid-row:1!important;
    align-self:center!important;justify-self:end!important;
    max-width:66px!important;padding-right:4px!important;
    color:var(--metadata)!important;font-size:10px!important;font-weight:540!important;line-height:1!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    font-variant-numeric:tabular-nums!important;
  }
  body.route-gallery .gallery.list-view .drive-more-btn,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn{
    right:1px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
  }
}
@media(max-width:360px){
  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard{
    grid-template-columns:38px minmax(0,1fr) 58px!important;
    padding-right:37px!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-size,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-size{max-width:58px!important;font-size:9.6px!important}
}


/* 2026-10-02 — v16 anchored Drive action popovers.
   Both row 3-dot and top selection 3-dot menus open at their trigger; no bottom sheet/scrim. */
@media(max-width:800px){
  body.route-gallery #driveContextMenu.mobile-drive-popover,
  body.route-gallery #driveSelectionMoreMenu.mobile-drive-selection-popover{
    position:fixed!important;
    right:auto!important;
    bottom:auto!important;
    opacity:1!important;
    visibility:visible;
    background:var(--mobile-tone-raised,var(--menu))!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    filter:none!important;
    border:0!important;
    box-shadow:0 12px 32px rgba(0,0,0,.26)!important;
    z-index:6200!important;
    pointer-events:auto!important;
  }
  html[data-theme="modern_dark"] body.route-gallery #driveContextMenu.mobile-drive-popover,
  html[data-theme="modern_dark"] body.route-gallery #driveSelectionMoreMenu.mobile-drive-selection-popover{
    background:#222426!important;
  }
  body.route-gallery #driveSelectionMoreMenu.mobile-drive-selection-popover{
    width:min(204px,calc(100vw - 16px))!important;
    min-width:176px!important;
    max-width:204px!important;
    max-height:min(62dvh,340px)!important;
    overflow:auto!important;
    padding:5px!important;
    border-radius:11px!important;
  }
  body.route-gallery #driveSelectionMoreMenu.mobile-drive-selection-popover button{
    width:100%!important;
    min-height:38px!important;
    height:38px!important;
    margin:0!important;
    padding:0 10px!important;
    border:0!important;
    border-radius:7px!important;
    background:transparent!important;
    color:var(--text)!important;
    font-size:12px!important;
    font-weight:590!important;
    text-align:left!important;
    opacity:1!important;
  }
  body.route-gallery #driveSelectionMoreMenu.mobile-drive-selection-popover button:active{
    background:var(--mobile-tone-block-2)!important;
  }
  body.mobile-action-menu-open:has(#driveContextMenu.mobile-drive-popover:not([hidden])) .mobile-action-scrim,
  body.mobile-action-menu-open:has(#driveSelectionMoreMenu.mobile-drive-selection-popover:not([hidden])) .mobile-action-scrim{
    display:none!important;
    opacity:0!important;
    pointer-events:none!important;
  }
}



/* v20: global mobile overflow is rendered by an inline top-level portal in base.html.
   No static mobile sheet/popover rule is allowed to own its geometry. */

/* 2026-10-02 — v21 anchored mobile menus + route-stability hard stop.
   Source menus remain desktop-only; mobile uses unique top-layer/fallback anchors.
   Whole-page opacity/transform animation is intentionally disabled because it was the
   remaining source of the visible flash/pop during real document navigation. */
@media(max-width:800px){
  #globalMoreMenu,#driveSelectionMoreMenu{display:none!important;visibility:hidden!important;pointer-events:none!important}

  #driveSelectionAnchorV21[data-open="0"]{display:none!important}
  #driveSelectionAnchorV21{
    position:fixed!important;left:auto;right:8px;top:92px;bottom:auto;
    width:196px;max-width:calc(100vw - 16px);max-height:min(320px,calc(100dvh - 80px));overflow:auto!important;
    margin:0!important;padding:5px!important;border:0!important;border-radius:11px!important;
    background:var(--mobile-tone-raised,#fff)!important;color:var(--text)!important;
    box-shadow:0 12px 30px rgba(0,0,0,.22)!important;z-index:2147483590!important;
    opacity:1!important;visibility:visible!important;transform:none!important;filter:none!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;pointer-events:auto!important;box-sizing:border-box!important;
  }
  html[data-theme="modern_dark"] #driveSelectionAnchorV21{background:#222426!important;color:#fff!important;box-shadow:0 14px 34px rgba(0,0,0,.32)!important}
  #driveSelectionAnchorV21 button{box-sizing:border-box!important;width:100%!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0 10px!important;border:0!important;border-radius:7px!important;background:transparent!important;color:inherit!important;text-align:left!important;font:590 12px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}
  #driveSelectionAnchorV21 button:active{background:var(--mobile-tone-block-2,var(--surface-pressed))!important}

  /* Row 3-dot menu is also a true anchored popover on mobile, not a bottom sheet. */
  #driveContextMenu.mobile-drive-popover{
    position:fixed!important;width:min(252px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;
    left:8px;right:auto!important;top:56px;bottom:auto!important;max-height:min(70dvh,520px)!important;overflow:auto!important;
    margin:0!important;padding:6px!important;border-radius:12px!important;z-index:2147483500!important;
    background:var(--mobile-tone-raised,var(--menu))!important;box-shadow:0 12px 30px rgba(0,0,0,.22)!important;
    opacity:1!important;visibility:visible;transform:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }

  /* No route-wide fade/translate. The old document stays painted until native navigation swaps it. */
  html,body,main,main>.page-shell{transform:none!important}
  main>.page-shell{animation:none!important;opacity:1!important;will-change:auto!important}
}
@media(min-width:801px){
  main>.page-shell{animation:none!important;transform:none!important;opacity:1!important;will-change:auto!important}
}

/* 2026-10-02 v22 — mobile hard-stop for legacy sheet/route effects.
   Global/selection overflow use JS-owned fixed portals with inline !important geometry. */
@media(max-width:800px){
  #globalMoreMenu,#driveSelectionMoreMenu{display:none!important;visibility:hidden!important;pointer-events:none!important}
  .mobile-route-veil,body.mobile-route-leaving .mobile-route-veil{display:none!important;opacity:0!important;animation:none!important;transition:none!important}
  html.cloud-booting main>.page-shell{opacity:.96!important;transform:none!important}
  html:not(.cloud-booting) main>.page-shell{opacity:1!important;transform:none!important;transition:opacity .105s ease-out!important;will-change:auto!important}
}
@media(max-width:800px) and (prefers-reduced-motion:reduce){html.cloud-booting main>.page-shell,html:not(.cloud-booting) main>.page-shell{opacity:1!important;transition:none!important}}

/* 2026-10-02 v23 — mobile app-shell navigation never blanks/fades the current surface. */
@media(max-width:800px){
  html.cloud-booting main>.page-shell,
  html:not(.cloud-booting) main>.page-shell,
  html.soft-nav-loading main>.page-shell{
    opacity:1!important;
    transform:none!important;
    transition:none!important;
    animation:none!important;
    will-change:auto!important;
  }
  .page-shell>.flash{display:none!important}
}


/* 2026-10-02 — Trash UI cleanup v28 */
@media (max-width:800px){
  .trash-policy,.wtrash-policy{grid-template-columns:38px minmax(0,1fr)!important;padding:12px!important;border-radius:14px!important}
  .trash-policy>span,.wtrash-policy>span{width:38px!important;height:38px!important;border-radius:10px!important;font-size:18px!important}
  .trash-bulkbar{grid-template-columns:1fr auto!important;gap:8px!important;padding:10px!important;border-radius:14px!important}
  .trash-bulkbar>span{grid-column:1/2!important;text-align:left!important}
  .trash-bulkbar form{grid-column:1/-1!important;margin-left:0!important}
  .trash-bulkbar form .danger{width:100%!important;min-height:42px!important}
  .trash-entry{grid-template-columns:26px 40px minmax(0,1fr)!important;padding:12px 10px 10px 12px!important;gap:10px!important}
  .trash-entry>.trash-kind{width:40px!important;height:40px!important;border-radius:10px!important}
  .trash-entry>div:not(.trash-card-actions)>b{font-size:13.5px!important}
  .trash-entry small{font-size:10.7px!important;white-space:normal!important}
  .trash-entry time{font-size:10px!important}
  .trash-entry .trash-card-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:6px!important;padding-top:8px!important;border-top:1px solid var(--line)!important}
  .trash-entry .trash-card-actions .trash-copy-link{grid-column:1/-1!important}
  .trash-entry .trash-card-actions button,.wtrash-actions button{width:100%!important;min-height:42px!important;height:42px!important;padding:0 10px!important;border-radius:10px!important;font-size:12px!important}
  .wtrash-card{padding:12px!important;border-radius:14px!important}
  .wtrash-main{grid-template-columns:40px minmax(0,1fr)!important;gap:10px!important}
  .wtrash-icon,.wtrash-user-avatar{width:40px!important;height:40px!important;border-radius:10px!important}
  .wtrash-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
}


/* 2026-10-02 — Trash compact correction v29 */
@media (max-width:800px){
  .trash-policy,.wtrash-policy{grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important;padding:8px 9px!important;border-radius:10px!important}
  .trash-policy>span,.wtrash-policy>span{width:32px!important;height:32px!important;border-radius:8px!important;font-size:15px!important}
  .trash-bulkbar{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:6px 8px!important;padding:6px 7px!important;border-radius:9px!important}
  .trash-bulkbar>span{grid-column:auto!important;text-align:left!important;font-size:10.5px!important}
  .trash-bulkbar form{grid-column:auto!important;margin-left:auto!important}
  .trash-bulkbar form .danger{width:auto!important;height:34px!important;min-height:34px!important;padding:0 9px!important;font-size:10.8px!important}
  .trash-entry{
    grid-template-columns:22px 34px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    min-height:0!important;padding:7px 8px!important;gap:6px 8px!important;border-radius:9px!important;
  }
  .trash-entry>.trash-select{grid-column:1!important;grid-row:1!important;width:22px!important;height:22px!important}
  .trash-entry>.trash-kind{grid-column:2!important;grid-row:1!important;width:32px!important;height:32px!important;border-radius:8px!important}
  .trash-entry>div:not(.trash-card-actions){grid-column:3!important;grid-row:1!important;padding:0!important}
  .trash-entry>div:not(.trash-card-actions)>b{font-size:12.5px!important;white-space:nowrap!important;display:block!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .trash-entry small{font-size:10px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .trash-entry time{font-size:9.4px!important;line-height:1.2!important;white-space:nowrap!important}
  .trash-entry>.trash-card-actions{
    grid-column:2/-1!important;grid-row:2!important;
    display:flex!important;justify-content:flex-end!important;gap:5px!important;
    margin:0!important;padding:5px 0 0!important;border-top:1px solid var(--line)!important;
  }
  .trash-entry .trash-card-actions .trash-copy-link{grid-column:auto!important}
  .trash-entry .trash-card-actions form{width:auto!important}
  .trash-entry .trash-card-actions button,.wtrash-actions button{width:auto!important;height:34px!important;min-height:34px!important;padding:0 9px!important;border-radius:8px!important;font-size:10.8px!important}
  .wtrash-card{padding:8px!important;border-radius:9px!important}
  .wtrash-main{grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important}
  .wtrash-icon,.wtrash-user-avatar{width:32px!important;height:32px!important;border-radius:8px!important}
  .wtrash-actions{display:flex!important;justify-content:flex-end!important;gap:5px!important;margin-top:6px!important;padding-top:6px!important}
}

/* 2026-10-02 — Drive mobile shell refresh inspired by the provided Google Drive-like reference.
   هدف: cleaner top search, rounded vivid icons, fixed bottom nav, clear dark/light parity. */
@media(max-width:800px){
  body.route-gallery{
    --drive-mobile-bg:#101820;
    --drive-mobile-card:#06111d;
    --drive-mobile-card-2:#0b1825;
    --drive-mobile-line:rgba(255,255,255,.07);
    --drive-mobile-pill:#202c3b;
    --drive-mobile-pill-2:#314459;
    --drive-mobile-text:#f4f8ff;
    --drive-mobile-muted:#a9b8cb;
    --drive-mobile-active:#86c8ff;
    --drive-mobile-accent:#0f6d91;
    --drive-mobile-accent-2:#6f63a9;
    background:var(--drive-mobile-bg)!important;
  }
  html[data-theme="modern_light"] body.route-gallery,
  html[data-theme="gray_light"] body.route-gallery,
  html[data-theme="arctic"] body.route-gallery,
  html[data-theme="rose"] body.route-gallery,
  html[data-theme="sand"] body.route-gallery{
    --drive-mobile-bg:#eef3f9;
    --drive-mobile-card:#ffffff;
    --drive-mobile-card-2:#f6f8fc;
    --drive-mobile-line:rgba(20,31,48,.08);
    --drive-mobile-pill:#dde6f1;
    --drive-mobile-pill-2:#ccd8e7;
    --drive-mobile-text:#152332;
    --drive-mobile-muted:#627489;
    --drive-mobile-active:#2c7cf6;
    --drive-mobile-accent:#14739f;
    --drive-mobile-accent-2:#7762c8;
  }
  body.route-gallery,
  body.route-gallery main,
  body.route-gallery main>.page-shell{background:var(--drive-mobile-bg)!important;color:var(--drive-mobile-text)!important}
  body.route-gallery main>.page-shell{padding:0 12px calc(96px + env(safe-area-inset-bottom))!important}

  body.route-gallery .mobile-menu{
    top:max(16px,env(safe-area-inset-top))!important;
    left:max(12px,env(safe-area-inset-left))!important;
    z-index:1600!important;
    width:40px!important;height:40px!important;min-height:40px!important;
    border:0!important;border-radius:12px!important;
    background:transparent!important;box-shadow:none!important;color:var(--drive-mobile-text)!important;
  }
  body.route-gallery .mobile-menu svg{stroke:currentColor!important;stroke-width:1.9!important}
  body.route-gallery .global-top-actions{display:none!important}
  body.route-gallery #globalNewAction{
    display:grid!important;position:fixed!important;right:max(16px,env(safe-area-inset-right))!important;
    bottom:calc(92px + env(safe-area-inset-bottom))!important;z-index:1800!important;
    width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;
    border:0!important;border-radius:24px!important;background:var(--drive-mobile-accent)!important;color:#f7fbff!important;
    box-shadow:0 18px 38px rgba(6,14,22,.28)!important;
  }
  body.route-gallery #globalNewAction svg{width:28px!important;height:28px!important;stroke-width:1.9!important}

  body.route-gallery .drive-file-header{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0 -12px 10px!important;padding:calc(10px + env(safe-area-inset-top)) 12px 0 12px!important;
    background:var(--drive-mobile-bg)!important;border:0!important;
  }
  body.route-gallery .drive-mobile-searchbar{padding:0 52px 0 52px!important}
  body.route-gallery .drive-mobile-search-pill{
    width:100%!important;height:48px!important;min-height:48px!important;padding:0 18px!important;
    display:flex!important;align-items:center!important;gap:12px!important;
    border:0!important;border-radius:24px!important;background:var(--drive-mobile-pill)!important;
    color:var(--drive-mobile-text)!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-search-pill svg{width:18px!important;height:18px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important;opacity:.94}
  body.route-gallery .drive-mobile-search-pill span{font-size:15px!important;font-weight:560!important;letter-spacing:-.01em!important;opacity:.95}

  body.route-gallery .drive-mobile-tabs{display:grid!important;grid-template-columns:1fr 1fr!important;gap:18px!important;align-items:end!important;padding:16px 6px 10px!important}
  body.route-gallery .drive-mobile-tabs button{
    position:relative!important;height:42px!important;min-height:42px!important;padding:0 0 10px!important;background:transparent!important;border:0!important;border-radius:0!important;
    color:var(--drive-mobile-muted)!important;font-size:15px!important;font-weight:700!important;justify-content:flex-start!important;text-align:left!important;
  }
  body.route-gallery .drive-mobile-tabs button.active{color:var(--drive-mobile-active)!important}
  body.route-gallery .drive-mobile-tabs button.active::after{
    content:"";position:absolute;left:0;bottom:0;width:68px;height:4px;border-radius:999px;background:currentColor;
  }

  body.route-gallery .drive-mobile-sectionbar{
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;
    padding:16px 16px!important;border-radius:22px 22px 0 0!important;background:var(--drive-mobile-card)!important;border:1px solid var(--drive-mobile-line)!important;border-bottom:0!important;
  }
  body.route-gallery .drive-mobile-sectionbar h1{margin:0!important;font-size:18px!important;font-weight:760!important;line-height:1.1!important;color:var(--drive-mobile-text)!important}
  body.route-gallery .drive-mobile-view-toggle{
    display:inline-flex!important;align-items:center!important;gap:8px!important;padding:6px!important;border-radius:18px!important;
    background:var(--drive-mobile-pill)!important;
  }
  body.route-gallery .drive-mobile-layout-option{
    width:54px!important;height:42px!important;min-width:54px!important;min-height:42px!important;border:0!important;border-radius:16px!important;
    background:transparent!important;color:var(--drive-mobile-muted)!important;display:grid!important;place-items:center!important;
  }
  body.route-gallery .drive-mobile-layout-option.active{background:#dce8f6!important;color:#304356!important}
  html[data-theme="modern_light"] body.route-gallery .drive-mobile-layout-option.active,
  html[data-theme="gray_light"] body.route-gallery .drive-mobile-layout-option.active,
  html[data-theme="arctic"] body.route-gallery .drive-mobile-layout-option.active,
  html[data-theme="rose"] body.route-gallery .drive-mobile-layout-option.active,
  html[data-theme="sand"] body.route-gallery .drive-mobile-layout-option.active{background:#d9e2ef!important;color:#233243!important}
  body.route-gallery .drive-mobile-layout-option svg{width:20px!important;height:20px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.7!important}
  body.route-gallery .drive-mobile-layout-option rect,
  body.route-gallery .drive-mobile-layout-option circle{stroke:currentColor!important;fill:none!important}

  body.route-gallery .drive-commandbar,
  body.route-gallery .drive-location-toolbar,
  body.route-gallery .drive-list-header{display:none!important}

  body.route-gallery .drive-file-viewport{
    background:var(--drive-mobile-card)!important;border:1px solid var(--drive-mobile-line)!important;border-top:0!important;border-radius:0 0 24px 24px!important;overflow:hidden!important;
  }
  body.route-gallery .gallery,
  body.route-gallery #driveDropTarget{padding:0!important;background:transparent!important}
  body.route-gallery .drive-item-section{padding:0!important;margin:0!important}
  body.route-gallery .drive-section-heading{display:none!important}

  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard,
  body.route-gallery .gallery.list-view .filecard.file-tile,
  body.route-gallery #driveDropTarget.list-view .filecard.file-tile,
  body.route-gallery .gallery.list-view .drive-folder-card,
  body.route-gallery #driveDropTarget.list-view .drive-folder-card{
    height:74px!important;min-height:74px!important;max-height:none!important;grid-template-columns:58px minmax(0,1fr)!important;padding:0 54px 0 12px!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;
    border-bottom:1px solid color-mix(in srgb,var(--drive-mobile-line) 92%,transparent)!important;
  }
  body.route-gallery .gallery.list-view .filecard:last-child,
  body.route-gallery #driveDropTarget.list-view .filecard:last-child{border-bottom:0!important}
  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{padding:0 10px!important}
  body.route-gallery .gallery.list-view .mobile-drive-copy b,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy b{color:var(--drive-mobile-text)!important;font-size:15px!important;font-weight:680!important;line-height:1.28!important}
  body.route-gallery .gallery.list-view .mobile-drive-filemeta,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-filemeta{display:inline-flex!important;align-items:center!important;gap:6px!important;margin-top:5px!important;color:var(--drive-mobile-muted)!important;font-size:11.5px!important;font-weight:620!important}
  body.route-gallery .gallery.list-view .mobile-drive-size,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-size{display:none!important}
  body.route-gallery .gallery.list-view .drive-more-btn,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn{
    width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;right:8px!important;border:0!important;border-radius:14px!important;
    background:transparent!important;color:var(--drive-mobile-muted)!important;font-size:22px!important;box-shadow:none!important;
  }


  .cloud-mobile-bottomnav{
    position:fixed;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));z-index:1700;
    display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:10px 12px 12px;border-radius:26px;
    background:rgba(15,24,36,.96);border:1px solid rgba(255,255,255,.08);box-shadow:0 18px 38px rgba(0,0,0,.26);
  }
  html[data-theme="modern_light"] .cloud-mobile-bottomnav,
  html[data-theme="gray_light"] .cloud-mobile-bottomnav,
  html[data-theme="arctic"] .cloud-mobile-bottomnav,
  html[data-theme="rose"] .cloud-mobile-bottomnav,
  html[data-theme="sand"] .cloud-mobile-bottomnav{background:rgba(255,255,255,.96);border-color:rgba(21,35,50,.08);box-shadow:0 14px 32px rgba(16,24,40,.12)}
  .cloud-mobile-bottomnav a{
    min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:62px;padding:6px 2px 2px;border-radius:18px;
    color:#dce6f3;text-decoration:none;font-size:11px;font-weight:650;letter-spacing:-.01em;
  }
  html[data-theme="modern_light"] .cloud-mobile-bottomnav a,
  html[data-theme="gray_light"] .cloud-mobile-bottomnav a,
  html[data-theme="arctic"] .cloud-mobile-bottomnav a,
  html[data-theme="rose"] .cloud-mobile-bottomnav a,
  html[data-theme="sand"] .cloud-mobile-bottomnav a{color:#5c6c7d}
  .cloud-mobile-bottomnav a.active{color:#ffffff}
  html[data-theme="modern_light"] .cloud-mobile-bottomnav a.active,
  html[data-theme="gray_light"] .cloud-mobile-bottomnav a.active,
  html[data-theme="arctic"] .cloud-mobile-bottomnav a.active,
  html[data-theme="rose"] .cloud-mobile-bottomnav a.active,
  html[data-theme="sand"] .cloud-mobile-bottomnav a.active{color:#223143}
  .cloud-mobile-navicon{
    width:24px;height:24px;display:grid;place-items:center;color:currentColor;
  }
  .cloud-mobile-navicon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  body.drive-mobile-starred-only .cloud-mobile-bottomnav [data-mobile-starred]{color:#fff!important}
}

/* 2026-10-02 — restore mobile-only components after desktop isolation. */
@media(max-width:800px){
  .cloud-mobile-bottomnav{display:grid!important}
  body.route-gallery .drive-mobile-searchbar{display:block!important}
  body.route-gallery .drive-mobile-tabs{display:grid!important}
  body.route-gallery .drive-mobile-sectionbar{display:flex!important}

  /* The FAB lives inside global-top-actions; keep the wrapper layout-neutral instead of hiding it. */
  body.route-gallery .global-top-actions{display:contents!important}
  body.route-gallery #globalPanelAction,
  body.route-gallery #globalMoreAction,
  body.route-gallery #globalMoreMenu{display:none!important}
}


/* 2026-10-02 — Drive mobile sheet rebuild v31.
   Goal: closely match the provided reference with a stable, no-jump layout. */
@media (max-width:800px){
  body.route-gallery{
    --drive-mobile-bg:#0f1923;
    --drive-mobile-shell:#081420;
    --drive-mobile-shell-2:#0d1b28;
    --drive-mobile-row:#091521;
    --drive-mobile-line:rgba(255,255,255,.05);
    --drive-mobile-pill:#1f2c39;
    --drive-mobile-pill-2:#3b4b5c;
    --drive-mobile-text:#f5f8fc;
    --drive-mobile-muted:#aab7c7;
    --drive-mobile-accent:#7cc7ff;
    --drive-mobile-fab:#02597a;
    --drive-mobile-fab2:#7161a7;
    overflow-x:hidden!important;
  }
  html[data-theme="modern_light"] body.route-gallery,
  html[data-theme="gray_light"] body.route-gallery,
  html[data-theme="arctic"] body.route-gallery,
  html[data-theme="rose"] body.route-gallery,
  html[data-theme="sand"] body.route-gallery{
    --drive-mobile-bg:#edf2f8;
    --drive-mobile-shell:#ffffff;
    --drive-mobile-shell-2:#f5f7fb;
    --drive-mobile-row:#ffffff;
    --drive-mobile-line:rgba(16,24,40,.08);
    --drive-mobile-pill:#dde5ef;
    --drive-mobile-pill-2:#c8d2de;
    --drive-mobile-text:#172534;
    --drive-mobile-muted:#718295;
    --drive-mobile-accent:#2c80f5;
    --drive-mobile-fab:#065f82;
    --drive-mobile-fab2:#7c69bd;
  }

  body.route-gallery,
  body.route-gallery main,
  body.route-gallery main>.page-shell{background:var(--drive-mobile-bg)!important;color:var(--drive-mobile-text)!important}
  body.route-gallery,
  body.route-gallery main>.page-shell,
  body.route-gallery .page-shell,
  body.route-gallery .drive-file-viewport,
  body.route-gallery #driveDropTarget{max-width:100%!important;overflow-x:hidden!important}
  body.route-gallery main>.page-shell{padding:0 16px calc(106px + env(safe-area-inset-bottom))!important}

  body.route-gallery .mobile-menu{
    top:max(16px,env(safe-area-inset-top))!important;
    left:max(10px,env(safe-area-inset-left))!important;
    width:42px!important;height:42px!important;min-height:42px!important;
    border-radius:12px!important;border:0!important;background:transparent!important;box-shadow:none!important;
    color:var(--drive-mobile-text)!important;z-index:1800!important;
  }
  body.route-gallery .mobile-menu:hover,
  body.route-gallery .mobile-menu:active{background:transparent!important}

  body.route-gallery .global-top-actions,
  body.route-gallery #globalNewAction,
  body.route-gallery #globalPanelAction,
  body.route-gallery #globalMoreAction,
  body.route-gallery #globalMoreMenu{display:none!important}

  body.route-gallery .drive-file-header{
    display:block!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0 -16px 12px!important;padding:calc(14px + env(safe-area-inset-top)) 16px 0!important;
    background:var(--drive-mobile-bg)!important;border:0!important;position:relative!important;z-index:2!important;
  }
  body.route-gallery .drive-mobile-searchbar{padding:0 48px 0 52px!important}
  body.route-gallery .drive-mobile-search-pill{
    width:100%!important;height:50px!important;min-height:50px!important;padding:0 18px!important;
    border:0!important;border-radius:26px!important;background:var(--drive-mobile-pill)!important;color:var(--drive-mobile-text)!important;
    display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-search-pill svg{width:18px!important;height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;opacity:.95!important}
  body.route-gallery .drive-mobile-search-pill span{font-size:15px!important;font-weight:540!important;letter-spacing:-.01em!important;opacity:.96!important}

  body.route-gallery .drive-mobile-tabs{
    display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:24px!important;
    padding:18px 6px 10px!important;
  }
  body.route-gallery .drive-mobile-tabs button{
    position:relative!important;flex:1 1 0!important;height:42px!important;min-height:42px!important;padding:0 0 12px!important;
    display:flex!important;align-items:flex-end!important;justify-content:flex-start!important;background:transparent!important;border:0!important;border-radius:0!important;
    color:var(--drive-mobile-muted)!important;font-size:16px!important;font-weight:700!important;text-align:left!important;
  }
  body.route-gallery .drive-mobile-tabs button:last-child{justify-content:flex-start!important}
  body.route-gallery .drive-mobile-tabs button.active{color:var(--drive-mobile-accent)!important}
  body.route-gallery .drive-mobile-tabs button.active::after{content:"";position:absolute;left:0;bottom:0;width:72px;height:4px;border-radius:999px;background:currentColor}

  body.route-gallery .drive-mobile-sectionbar{
    display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;
    padding:16px 16px!important;background:var(--drive-mobile-shell)!important;border:1px solid var(--drive-mobile-line)!important;border-bottom:0!important;
    border-radius:22px 22px 0 0!important;
  }
  body.route-gallery .drive-mobile-sectionbar h1{margin:0!important;font-size:17px!important;font-weight:760!important;letter-spacing:-.01em!important;color:var(--drive-mobile-text)!important}
  body.route-gallery .drive-mobile-view-toggle{
    display:inline-flex!important;align-items:center!important;gap:8px!important;padding:6px!important;border-radius:18px!important;background:var(--drive-mobile-pill)!important;
  }
  body.route-gallery .drive-mobile-layout-option{
    width:52px!important;height:42px!important;min-width:52px!important;min-height:42px!important;border:0!important;border-radius:16px!important;background:transparent!important;
    color:var(--drive-mobile-muted)!important;display:grid!important;place-items:center!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-layout-option.active{background:#d7e3f0!important;color:#2f4052!important}
  body.route-gallery .drive-mobile-layout-option svg{width:20px!important;height:20px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.7!important}
  body.route-gallery .drive-mobile-layout-option rect,
  body.route-gallery .drive-mobile-layout-option circle{stroke:currentColor!important;fill:none!important}

  body.route-gallery .drive-commandbar,
  body.route-gallery .drive-location-toolbar,
  body.route-gallery .drive-list-header,
  body.route-gallery .drive-pager{display:none!important}

  body.route-gallery .drive-file-viewport{
    background:var(--drive-mobile-shell)!important;border:1px solid var(--drive-mobile-line)!important;border-top:0!important;border-radius:0 0 24px 24px!important;overflow:hidden!important;
  }
  body.route-gallery .gallery,
  body.route-gallery #driveDropTarget{padding:0!important;background:transparent!important}
  body.route-gallery .drive-item-section,
  body.route-gallery .drive-folder-grid,
  body.route-gallery .drive-files-grid{display:block!important;padding:0!important;margin:0!important}
  body.route-gallery .drive-section-heading{display:none!important}

  body.route-gallery .gallery.list-view .filecard,
  body.route-gallery #driveDropTarget.list-view .filecard,
  body.route-gallery .gallery.list-view .filecard.file-tile,
  body.route-gallery #driveDropTarget.list-view .filecard.file-tile,
  body.route-gallery .gallery.list-view .drive-folder-card,
  body.route-gallery #driveDropTarget.list-view .drive-folder-card{
    position:relative!important;display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;grid-template-rows:84px!important;
    width:100%!important;min-width:0!important;height:84px!important;min-height:84px!important;max-height:84px!important;
    padding:0 54px 0 12px!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
    border-bottom:1px solid color-mix(in srgb,var(--drive-mobile-line) 96%,transparent)!important;box-sizing:border-box!important;overflow:hidden!important;
  }
  body.route-gallery .gallery.list-view .filecard:last-child,
  body.route-gallery #driveDropTarget.list-view .filecard:last-child{border-bottom:0!important}
  body.route-gallery .gallery.list-view .filecard>.preview,
  body.route-gallery #driveDropTarget.list-view .filecard>.preview,
  body.route-gallery .gallery.list-view .filecard>.drive-folder-select,
  body.route-gallery #driveDropTarget.list-view .filecard>.drive-folder-select{
    grid-column:1!important;grid-row:1!important;place-self:center!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;
    border-radius:14px!important;overflow:hidden!important;border:0!important;box-shadow:none!important;
  }
  body.route-gallery .gallery.list-view .mobile-drive-copy,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy{display:block!important;grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;padding:0 8px 0 10px!important}
  body.route-gallery .gallery.list-view .mobile-drive-copy b,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-copy b{display:block!important;color:var(--drive-mobile-text)!important;font-size:15px!important;font-weight:670!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.route-gallery .gallery.list-view .mobile-drive-filemeta,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-filemeta{display:inline-flex!important;align-items:center!important;gap:6px!important;margin-top:7px!important;color:var(--drive-mobile-muted)!important;font-size:11.3px!important;font-weight:590!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important}
  body.route-gallery .gallery.list-view .mobile-drive-owner,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-owner,
  body.route-gallery .gallery.list-view .mobile-drive-date,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-date{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body.route-gallery .gallery.list-view .mobile-drive-meta-dot,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-meta-dot{flex:0 0 auto!important;opacity:.7!important}
  body.route-gallery .gallery.list-view .mobile-drive-size,
  body.route-gallery #driveDropTarget.list-view .mobile-drive-size,
  body.route-gallery .gallery.list-view .drive-list-name,
  body.route-gallery #driveDropTarget.list-view .drive-list-name,
  body.route-gallery .gallery.list-view .drive-list-owner,
  body.route-gallery #driveDropTarget.list-view .drive-list-owner,
  body.route-gallery .gallery.list-view .drive-list-kind,
  body.route-gallery #driveDropTarget.list-view .drive-list-kind,
  body.route-gallery .gallery.list-view .drive-list-size,
  body.route-gallery #driveDropTarget.list-view .drive-list-size,
  body.route-gallery .gallery.list-view .drive-list-date,
  body.route-gallery #driveDropTarget.list-view .drive-list-date,
  body.route-gallery .gallery.list-view .file-meta-row,
  body.route-gallery #driveDropTarget.list-view .file-meta-row,
  body.route-gallery .gallery.list-view .filetype-corner,
  body.route-gallery #driveDropTarget.list-view .filetype-corner,
  body.route-gallery .gallery.list-view .video-play-badge,
  body.route-gallery #driveDropTarget.list-view .video-play-badge{display:none!important}

  body.route-gallery .gallery.list-view .drive-more-btn,
  body.route-gallery #driveDropTarget.list-view .drive-more-btn{
    position:absolute!important;top:50%!important;right:8px!important;transform:translateY(-50%)!important;
    width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:0!important;margin:0!important;
    border:0!important;border-radius:12px!important;background:transparent!important;color:#bac6d4!important;font-size:22px!important;line-height:1!important;box-shadow:none!important;
  }

  body.route-gallery .gallery.list-view .drive-folder-select,
  body.route-gallery #driveDropTarget.list-view .drive-folder-select{background:#111f2f!important;color:#6ec0ff!important}
  body.route-gallery .gallery.list-view .preview.image-preview,
  body.route-gallery #driveDropTarget.list-view .preview.image-preview,
  body.route-gallery .gallery.list-view .preview.document-preview,
  body.route-gallery #driveDropTarget.list-view .preview.document-preview,
  body.route-gallery .gallery.list-view .preview.audio,
  body.route-gallery #driveDropTarget.list-view .preview.audio,
  body.route-gallery .gallery.list-view .table-preview,
  body.route-gallery #driveDropTarget.list-view .table-preview{background:#131f2c!important}
  body.route-gallery .gallery.list-view .kind-image .preview,
  body.route-gallery #driveDropTarget.list-view .kind-image .preview,
  body.route-gallery .gallery.list-view .kind-design .preview,
  body.route-gallery #driveDropTarget.list-view .kind-design .preview{background:#ff4f52!important}
  body.route-gallery .gallery.list-view .kind-video .preview,
  body.route-gallery #driveDropTarget.list-view .kind-video .preview{background:#ff514f!important}
  body.route-gallery .gallery.list-view .kind-pdf .preview,
  body.route-gallery #driveDropTarget.list-view .kind-pdf .preview{background:#ff4d4f!important}
  body.route-gallery .gallery.list-view .kind-table .preview,
  body.route-gallery #driveDropTarget.list-view .kind-table .preview,
  body.route-gallery .gallery.list-view .kind-table .table-preview,
  body.route-gallery #driveDropTarget.list-view .kind-table .table-preview{background:#13b96c!important}
  body.route-gallery .gallery.list-view .kind-audio .preview,
  body.route-gallery #driveDropTarget.list-view .kind-audio .preview,
  body.route-gallery .gallery.list-view .kind-text .preview,
  body.route-gallery #driveDropTarget.list-view .kind-text .preview{background:#5d6ff7!important}
  body.route-gallery .gallery.list-view .kind-archive .preview,
  body.route-gallery #driveDropTarget.list-view .kind-archive .preview{background:#ff9a34!important}
  body.route-gallery .gallery.list-view .kind-checksum .preview,
  body.route-gallery #driveDropTarget.list-view .kind-checksum .preview{background:#7b67f3!important}
  body.route-gallery .gallery.list-view .preview.document-preview,
  body.route-gallery #driveDropTarget.list-view .preview.document-preview,
  body.route-gallery .gallery.list-view .preview.image-preview,
  body.route-gallery #driveDropTarget.list-view .preview.image-preview,
  body.route-gallery .gallery.list-view .preview.audio,
  body.route-gallery #driveDropTarget.list-view .preview.audio,
  body.route-gallery .gallery.list-view .table-preview,
  body.route-gallery #driveDropTarget.list-view .table-preview,
  body.route-gallery .gallery.list-view .drive-kind-tile,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile,
  body.route-gallery .gallery.list-view .drive-file-glyph,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph{display:grid!important;place-items:center!important}
  body.route-gallery .gallery.list-view .drive-folder-symbol,
  body.route-gallery #driveDropTarget.list-view .drive-folder-symbol,
  body.route-gallery .gallery.list-view .drive-kind-tile svg,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile svg,
  body.route-gallery .gallery.list-view .drive-file-glyph svg,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph svg,
  body.route-gallery .gallery.list-view .audio-card-icon svg,
  body.route-gallery #driveDropTarget.list-view .audio-card-icon svg{width:22px!important;height:22px!important;stroke:#fff!important;fill:none!important;stroke-width:1.8!important}
  body.route-gallery .gallery.list-view .drive-kind-tile b,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile b,
  body.route-gallery .gallery.list-view .drive-file-glyph b,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph b{color:#fff!important;font-size:10px!important;line-height:1!important}
  body.route-gallery .gallery.list-view .sheet-file-icon,
  body.route-gallery #driveDropTarget.list-view .sheet-file-icon{width:24px!important;height:24px!important;object-fit:contain!important;filter:brightness(0) invert(1)!important}

  body.route-gallery #driveDropTarget:not(.list-view){
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:4px 10px 12px!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .drive-item-section,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-folder-grid,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-files-grid{display:contents!important}
  body.route-gallery #driveDropTarget:not(.list-view) .filecard{
    min-width:0!important;height:138px!important;min-height:138px!important;padding:12px!important;border-radius:20px!important;background:var(--drive-mobile-shell-2)!important;border:1px solid var(--drive-mobile-line)!important;box-shadow:none!important;
  }

  body.route-gallery .drive-mobile-fab-stack{
    position:fixed!important;right:max(16px,env(safe-area-inset-right))!important;bottom:calc(88px + env(safe-area-inset-bottom))!important;z-index:1900!important;
    display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:14px!important;pointer-events:none!important;
  }
  body.route-gallery .drive-mobile-fab-stack button{pointer-events:auto!important;border:0!important;box-shadow:0 18px 34px rgba(0,0,0,.22)!important;color:#fff!important}
  body.route-gallery .drive-mobile-mini-fab{
    width:60px!important;height:60px!important;min-width:60px!important;min-height:60px!important;border-radius:20px!important;background:var(--drive-mobile-fab2)!important;display:grid!important;place-items:center!important;
  }
  body.route-gallery .drive-mobile-main-fab{
    width:74px!important;height:74px!important;min-width:74px!important;min-height:74px!important;border-radius:24px!important;background:var(--drive-mobile-fab)!important;display:grid!important;place-items:center!important;
  }
  body.route-gallery .drive-mobile-mini-fab svg,
  body.route-gallery .drive-mobile-main-fab svg{width:28px!important;height:28px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  body.route-gallery .drive-mobile-main-fab svg{width:30px!important;height:30px!important}

  .cloud-mobile-bottomnav{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:1700!important;
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;padding:8px 8px calc(10px + env(safe-area-inset-bottom))!important;
    border-radius:0!important;border:0!important;border-top:1px solid rgba(255,255,255,.05)!important;background:var(--drive-mobile-bg)!important;box-shadow:none!important;
  }
  html[data-theme="modern_light"] .cloud-mobile-bottomnav,
  html[data-theme="gray_light"] .cloud-mobile-bottomnav,
  html[data-theme="arctic"] .cloud-mobile-bottomnav,
  html[data-theme="rose"] .cloud-mobile-bottomnav,
  html[data-theme="sand"] .cloud-mobile-bottomnav{border-top-color:rgba(16,24,40,.08)!important;background:var(--drive-mobile-bg)!important}
  .cloud-mobile-bottomnav a{
    min-width:0!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;
    min-height:58px!important;padding:4px 2px 0!important;border-radius:18px!important;text-decoration:none!important;color:var(--drive-mobile-muted)!important;font-size:11px!important;font-weight:640!important;letter-spacing:-.01em!important;
  }
  .cloud-mobile-bottomnav a.active{color:var(--drive-mobile-text)!important}
  .cloud-mobile-bottomnav a.active .cloud-mobile-navicon{background:#d7e3f0!important;color:#243444!important}
  .cloud-mobile-navicon{width:26px!important;height:26px!important;display:grid!important;place-items:center!important;color:currentColor!important;border-radius:13px!important}
  .cloud-mobile-navicon svg{width:21px!important;height:21px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  body.drive-mobile-starred-only .cloud-mobile-bottomnav [data-mobile-starred]{color:var(--drive-mobile-text)!important}
  body.drive-mobile-starred-only .cloud-mobile-bottomnav [data-mobile-starred] .cloud-mobile-navicon{background:#d7e3f0!important;color:#243444!important}
}

/* 2026-10-02 — Drive mobile stabilization v32.
   User feedback: keep top bar fixed, remove non-system labels, reuse web icon language, and repair grid/list behavior. */
@media (max-width:800px){
  body.route-gallery .drive-mobile-tabs{display:none!important}

  body.route-gallery .drive-file-header{
    position:sticky!important;
    top:0!important;
    z-index:1750!important;
    padding-bottom:12px!important;
    background:linear-gradient(180deg,var(--drive-mobile-bg) 0%,var(--drive-mobile-bg) 86%,color-mix(in srgb,var(--drive-mobile-bg) 76%,transparent) 100%)!important;
    backdrop-filter:saturate(1.04) blur(4px)!important;
  }

  body.route-gallery .drive-mobile-searchbar{padding:0 48px 0 52px!important}
  body.route-gallery .drive-mobile-sectionbar{
    border-radius:20px!important;
    border:1px solid var(--drive-mobile-line)!important;
  }
  body.route-gallery .drive-file-viewport{
    border-top:1px solid var(--drive-mobile-line)!important;
    border-radius:22px!important;
  }

  body.route-gallery .gallery.list-view .drive-folder-select,
  body.route-gallery #driveDropTarget.list-view .drive-folder-select,
  body.route-gallery .gallery.list-view .preview.document-preview,
  body.route-gallery #driveDropTarget.list-view .preview.document-preview,
  body.route-gallery .gallery.list-view .preview.audio,
  body.route-gallery #driveDropTarget.list-view .preview.audio,
  body.route-gallery .gallery.list-view .table-preview,
  body.route-gallery #driveDropTarget.list-view .table-preview,
  body.route-gallery .gallery.list-view .drive-kind-tile,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile,
  body.route-gallery .gallery.list-view .drive-file-glyph,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph{
    background:var(--drive-mobile-shell-2)!important;
    color:var(--drive-mobile-text)!important;
  }
  body.route-gallery .gallery.list-view .drive-folder-symbol,
  body.route-gallery #driveDropTarget.list-view .drive-folder-symbol,
  body.route-gallery .gallery.list-view .drive-kind-tile svg,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile svg,
  body.route-gallery .gallery.list-view .drive-file-glyph svg,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph svg,
  body.route-gallery .gallery.list-view .audio-card-icon svg,
  body.route-gallery #driveDropTarget.list-view .audio-card-icon svg{stroke:currentColor!important}
  body.route-gallery .gallery.list-view .drive-kind-tile b,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile b,
  body.route-gallery .gallery.list-view .drive-file-glyph b,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph b{color:currentColor!important}

  body.route-gallery .gallery.list-view .kind-image .preview,
  body.route-gallery #driveDropTarget.list-view .kind-image .preview,
  body.route-gallery .gallery.list-view .kind-design .preview,
  body.route-gallery #driveDropTarget.list-view .kind-design .preview,
  body.route-gallery .gallery.list-view .kind-video .preview,
  body.route-gallery #driveDropTarget.list-view .kind-video .preview,
  body.route-gallery .gallery.list-view .kind-pdf .preview,
  body.route-gallery #driveDropTarget.list-view .kind-pdf .preview,
  body.route-gallery .gallery.list-view .kind-table .preview,
  body.route-gallery #driveDropTarget.list-view .kind-table .preview,
  body.route-gallery .gallery.list-view .kind-audio .preview,
  body.route-gallery #driveDropTarget.list-view .kind-audio .preview,
  body.route-gallery .gallery.list-view .kind-text .preview,
  body.route-gallery #driveDropTarget.list-view .kind-text .preview,
  body.route-gallery .gallery.list-view .kind-archive .preview,
  body.route-gallery #driveDropTarget.list-view .kind-archive .preview,
  body.route-gallery .gallery.list-view .kind-checksum .preview,
  body.route-gallery #driveDropTarget.list-view .kind-checksum .preview{background:var(--drive-mobile-shell-2)!important}

  body.route-gallery #driveDropTarget:not(.list-view){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
    padding:8px 12px 16px!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .drive-item-section,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-folder-grid,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-files-grid{display:contents!important}
  body.route-gallery #driveDropTarget:not(.list-view) .filecard,
  body.route-gallery #driveDropTarget:not(.list-view) .filecard.file-tile,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-folder-card{
    position:relative!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    align-content:start!important;
    min-width:0!important;
    width:100%!important;
    min-height:156px!important;
    height:156px!important;
    padding:12px!important;
    border-radius:18px!important;
    background:var(--drive-mobile-shell-2)!important;
    border:1px solid var(--drive-mobile-line)!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .filecard>.preview,
  body.route-gallery #driveDropTarget:not(.list-view) .filecard>.drive-folder-select{
    width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;
    border-radius:16px!important;grid-row:1!important;grid-column:1!important;place-self:start!important;
    background:var(--drive-mobile-shell)!important;color:var(--drive-mobile-text)!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .drive-folder-symbol,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-kind-tile svg,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-file-glyph svg,
  body.route-gallery #driveDropTarget:not(.list-view) .audio-card-icon svg{stroke:currentColor!important}
  body.route-gallery #driveDropTarget:not(.list-view) .drive-kind-tile,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-file-glyph,
  body.route-gallery #driveDropTarget:not(.list-view) .preview.document-preview,
  body.route-gallery #driveDropTarget:not(.list-view) .preview.audio,
  body.route-gallery #driveDropTarget:not(.list-view) .table-preview{background:var(--drive-mobile-shell)!important;color:var(--drive-mobile-text)!important}
  body.route-gallery #driveDropTarget:not(.list-view) .mobile-drive-copy{
    display:block!important;
    grid-row:2!important;
    grid-column:1!important;
    min-width:0!important;
    align-self:end!important;
    padding-top:16px!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .mobile-drive-copy b{
    display:block!important;
    color:var(--drive-mobile-text)!important;
    font-size:14px!important;
    font-weight:670!important;
    line-height:1.28!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .mobile-drive-filemeta{
    display:inline-flex!important;
    align-items:center!important;
    gap:6px!important;
    margin-top:8px!important;
    color:var(--drive-mobile-muted)!important;
    font-size:11px!important;
    font-weight:560!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    max-width:100%!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .drive-more-btn{
    position:absolute!important;
    top:10px!important;
    right:8px!important;
    transform:none!important;
    width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
    border:0!important;border-radius:12px!important;background:transparent!important;color:var(--drive-mobile-muted)!important;
    font-size:21px!important;line-height:1!important;box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view) .mobile-drive-size,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-list-name,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-list-owner,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-list-kind,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-list-size,
  body.route-gallery #driveDropTarget:not(.list-view) .drive-list-date,
  body.route-gallery #driveDropTarget:not(.list-view) .file-meta-row,
  body.route-gallery #driveDropTarget:not(.list-view) .filetype-corner,
  body.route-gallery #driveDropTarget:not(.list-view) .video-play-badge{display:none!important}

  body.route-gallery .drive-mobile-fab-stack{bottom:calc(86px + env(safe-area-inset-bottom))!important}
  body.route-gallery .drive-mobile-mini-fab,
  body.route-gallery .drive-mobile-main-fab{box-shadow:0 14px 28px rgba(0,0,0,.18)!important}
}

/* 2026-10-02 — mobile Drive shell stabilization v33.
   Drawer must own the viewport when open; header stays fixed during normal scrolling;
   all dark/light surfaces share one coherent palette. */
@media(max-width:800px){
  body.route-gallery{
    --drive-mobile-bg:#101a24;
    --drive-mobile-shell:#08141f;
    --drive-mobile-shell-2:#0d1a26;
    --drive-mobile-row:#0b1722;
    --drive-mobile-line:rgba(255,255,255,.055);
    --drive-mobile-pill:#1d2b39;
    --drive-mobile-pill-2:#334557;
    --drive-mobile-text:#f4f7fb;
    --drive-mobile-muted:#aeb9c7;
    --drive-mobile-accent:#8bc9f6;
  }
  html[data-theme="modern_light"] body.route-gallery,
  html[data-theme="gray_light"] body.route-gallery,
  html[data-theme="arctic"] body.route-gallery,
  html[data-theme="rose"] body.route-gallery,
  html[data-theme="sand"] body.route-gallery{
    --drive-mobile-bg:#eef2f6;
    --drive-mobile-shell:#ffffff;
    --drive-mobile-shell-2:#f5f7fa;
    --drive-mobile-row:#ffffff;
    --drive-mobile-line:rgba(21,33,48,.085);
    --drive-mobile-pill:#e1e7ee;
    --drive-mobile-pill-2:#cdd7e1;
    --drive-mobile-text:#172433;
    --drive-mobile-muted:#68798b;
    --drive-mobile-accent:#287be5;
  }

  body.route-gallery .drive-file-header{
    position:sticky!important;
    top:0!important;
    z-index:1750!important;
    margin-bottom:10px!important;
    background:var(--drive-mobile-bg)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    box-shadow:none!important;
  }

  /* Drawer and its shade sit above every sticky/fixed Drive surface. */
  body.route-gallery.menu-open .shade{
    display:block!important;
    position:fixed!important;
    inset:0!important;
    z-index:2550!important;
    opacity:1!important;
    pointer-events:auto!important;
    background:rgba(0,0,0,.52)!important;
  }
  body.route-gallery .app-sidebar,
  body.route-gallery.menu-open .app-sidebar{
    z-index:2600!important;
    background:var(--drive-mobile-bg)!important;
    color:var(--drive-mobile-text)!important;
    border-right:1px solid var(--drive-mobile-line)!important;
    box-shadow:none!important;
  }
  body.route-gallery.menu-open .drive-file-header,
  body.route-gallery.menu-open .cloud-mobile-bottomnav,
  body.route-gallery.menu-open .drive-mobile-fab-stack{pointer-events:none!important}

  /* Sidebar inherits the same palette as the Drive page; web SVG/icon markup is kept. */
  body.route-gallery .app-sidebar .sidebar-top,
  body.route-gallery .app-sidebar .sidebar-bottom,
  body.route-gallery .app-sidebar .sidebar-nav,
  body.route-gallery .app-sidebar nav{background:transparent!important}
  body.route-gallery .app-sidebar nav a,
  body.route-gallery .app-sidebar .worktrack-side-row,
  body.route-gallery .app-sidebar .worktrack-side-home{
    color:var(--drive-mobile-text)!important;
    background:transparent!important;
    border-color:transparent!important;
  }
  body.route-gallery .app-sidebar nav a:hover,
  body.route-gallery .app-sidebar .worktrack-side-row:hover,
  body.route-gallery .app-sidebar .worktrack-side-home:hover{background:var(--drive-mobile-shell-2)!important}
  body.route-gallery .app-sidebar nav a.active,
  body.route-gallery .app-sidebar .worktrack-side-row.active,
  body.route-gallery .app-sidebar .worktrack-side-home.active{
    color:var(--drive-mobile-text)!important;
    background:var(--drive-mobile-shell-2)!important;
  }
  body.route-gallery .app-sidebar .navico,
  body.route-gallery .app-sidebar nav a .navico,
  body.route-gallery .app-sidebar .worktrack-side-row .navico,
  body.route-gallery .app-sidebar .worktrack-side-home .navico{color:var(--drive-mobile-muted)!important}
  body.route-gallery .app-sidebar nav a.active .navico,
  body.route-gallery .app-sidebar .worktrack-side-row.active .navico,
  body.route-gallery .app-sidebar .worktrack-side-home.active .navico{color:var(--drive-mobile-text)!important}
  body.route-gallery .app-sidebar .drive-new-side,
  body.route-gallery .app-sidebar .sidebar-search-trigger,
  body.route-gallery .app-sidebar .workspace-link,
  body.route-gallery .app-sidebar .sidefoot{
    background:var(--drive-mobile-shell)!important;
    color:var(--drive-mobile-text)!important;
    border-color:var(--drive-mobile-line)!important;
    box-shadow:none!important;
  }
  body.route-gallery .app-sidebar .sidebar-bottom{border-top-color:var(--drive-mobile-line)!important}
  body.route-gallery .app-sidebar .sidebar-rollback,
  body.route-gallery .app-sidebar .sideuser small{color:var(--drive-mobile-muted)!important}
  body.route-gallery .app-sidebar nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16)!important}
  html[data-theme="modern_light"] body.route-gallery .app-sidebar nav::-webkit-scrollbar-thumb{background:rgba(20,32,46,.13)!important}

  /* Keep the bottom navigation visually connected to the page instead of a third dark tone. */
  body.route-gallery .cloud-mobile-bottomnav{
    background:var(--drive-mobile-bg)!important;
    border-top:1px solid var(--drive-mobile-line)!important;
    color:var(--drive-mobile-text)!important;
  }
  body.route-gallery .cloud-mobile-bottomnav a{color:var(--drive-mobile-muted)!important}
  body.route-gallery .cloud-mobile-bottomnav a.active{color:var(--drive-mobile-text)!important}

  /* Grid/list toggle has a stable two-state geometry and never moves when selected. */
  body.route-gallery .drive-mobile-view-toggle{width:136px!important;min-width:136px!important;justify-content:space-between!important}
  body.route-gallery .drive-mobile-layout-option{
    flex:0 0 60px!important;
    width:60px!important;min-width:60px!important;max-width:60px!important;
    height:44px!important;min-height:44px!important;max-height:44px!important;
    margin:0!important;padding:0!important;transform:none!important;
  }
  body.route-gallery .drive-mobile-layout-option.active{transform:none!important;box-shadow:none!important}

  /* Grid is an actual two-column layout. Direct JS toggles the same list-view class as desktop. */
  body.route-gallery #driveDropTarget:not(.list-view){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    width:100%!important;
    padding:10px!important;
    box-sizing:border-box!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view)>.drive-item-section,
  body.route-gallery #driveDropTarget:not(.list-view)>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget:not(.list-view)>.drive-item-section>.drive-files-grid{display:contents!important}
  body.route-gallery #driveDropTarget:not(.list-view) .filecard{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    box-sizing:border-box!important;
  }

  /* Never allow the drawer-open state to show floating Drive controls through it. */
  body.route-gallery.menu-open .drive-mobile-fab-stack,
  body.route-gallery.menu-open .cloud-mobile-bottomnav{visibility:hidden!important}
}

/* 2026-10-02 — universal mobile dark blue theme v34.
   Uses the Drive mobile blue-black palette across every authenticated subpage.
   Desktop and all light themes are intentionally untouched. */
@media(max-width:800px){
  html[data-theme="modern_dark"]{
    --desktop-bg:#101a24!important;
    --bg:#101a24!important;
    --side:#0b1621!important;
    --card:#0d1a26!important;
    --panel:#0d1a26!important;
    --soft:#132230!important;
    --surface-main:#101a24!important;
    --surface-raised:#142331!important;
    --surface-sunken:#08141f!important;
    --surface-hover:#172a3a!important;
    --surface-pressed:#1b3042!important;
    --surface-selected:#20364a!important;
    --text:#f4f7fb!important;
    --muted:#d8e0e9!important;
    --metadata:#aeb9c7!important;
    --line:rgba(255,255,255,.065)!important;
    --line-strong:rgba(255,255,255,.105)!important;
    --input:#132230!important;
    --menu:#0d1a26!important;
    --dialog:#0d1a26!important;
    --preview:#0d1a26!important;
    --folder-surface:transparent!important;
    --folder-hover:#172a3a!important;
    --control-bg:#142331!important;
    --control-hover:#1b3042!important;
    --sidebar-bg:#0b1621!important;
    --sidebar-border:rgba(255,255,255,.07)!important;
    --sidebar-text:#f4f7fb!important;
    --sidebar-muted:#aeb9c7!important;
    --sidebar-hover:#142331!important;
    --sidebar-active:#20364a!important;
    --sidebar-active-bg:#20364a!important;
    --sidebar-active-text:#ffffff!important;
    --sidebar-icon:#c7d4e2!important;
    --page-surface:#101a24!important;
    --card-border:rgba(255,255,255,.065)!important;
    --file-name:#f4f7fb!important;
    --table-line:rgba(255,255,255,.075)!important;
    --input-line:rgba(255,255,255,.08)!important;
    --primary-control-bg:#17304a!important;
    --primary-control-hover:#1d3a58!important;
    --primary-control-pressed:#224464!important;
    color-scheme:dark!important;
    background:#101a24!important;
  }
  html[data-theme="modern_dark"] body,
  html[data-theme="modern_dark"] main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main),
  html[data-theme="modern_dark"] main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main)>.page-shell,
  html[data-theme="modern_dark"] .page-shell{
    background:#101a24!important;
    color:var(--text)!important;
  }
  html[data-theme="modern_dark"] .app-sidebar{
    background:#0b1621!important;
    border-right-color:var(--line)!important;
    color:var(--text)!important;
  }
  html[data-theme="modern_dark"] header,
  html[data-theme="modern_dark"] .compact-head,
  html[data-theme="modern_dark"] .file-header,
  html[data-theme="modern_dark"] .work-head,
  html[data-theme="modern_dark"] .kanban-head{
    background:#101a24!important;
    color:var(--text)!important;
  }
  html[data-theme="modern_dark"] dialog:not(.cloud-preview-drawer),
  html[data-theme="modern_dark"] .drive-context-menu,
  html[data-theme="modern_dark"] .global-context-menu,
  html[data-theme="modern_dark"] .drive-selection-more-menu,
  html[data-theme="modern_dark"] .work-card-dropdown,
  html[data-theme="modern_dark"] .kanban-item-menu,
  html[data-theme="modern_dark"] .chat-context-menu,
  html[data-theme="modern_dark"] .message-context-menu,
  html[data-theme="modern_dark"] .sheet-option-pop,
  html[data-theme="modern_dark"] .sheet2-context,
  html[data-theme="modern_dark"] .sheet2-menu-pop,
  html[data-theme="modern_dark"] .share-menu,
  html[data-theme="modern_dark"] .drive-new-menu,
  html[data-theme="modern_dark"] .workspace-menu,
  html[data-theme="modern_dark"] .worktrack-new-floating{
    background:#0d1a26!important;
    color:var(--text)!important;
    border-color:var(--line)!important;
  }
  html[data-theme="modern_dark"] .panelcard,
  html[data-theme="modern_dark"] .security-panel,
  html[data-theme="modern_dark"] .appearance-section,
  html[data-theme="modern_dark"] .app-card,
  html[data-theme="modern_dark"] .table-drive-card,
  html[data-theme="modern_dark"] .vault-card,
  html[data-theme="modern_dark"] .kanban-column,
  html[data-theme="modern_dark"] .kanban-card,
  html[data-theme="modern_dark"] .work-card,
  html[data-theme="modern_dark"] .trash-entry,
  html[data-theme="modern_dark"] .unified-trash-card,
  html[data-theme="modern_dark"] .chat-sidebar,
  html[data-theme="modern_dark"] .mail-panel,
  html[data-theme="modern_dark"] .cloud-share-section{
    background:#0d1a26!important;
    color:var(--text)!important;
    border-color:var(--line)!important;
    box-shadow:none!important;
  }
  html[data-theme="modern_dark"] .cloud-mobile-bottomnav{
    background:#101a24!important;
    color:var(--text)!important;
    border-top-color:var(--line)!important;
  }
  html[data-theme="modern_dark"] .cloud-mobile-bottomnav a{color:#aeb9c7!important}
  html[data-theme="modern_dark"] .cloud-mobile-bottomnav a.active{color:#f4f7fb!important}
  html[data-theme="modern_dark"] input,
  html[data-theme="modern_dark"] select,
  html[data-theme="modern_dark"] textarea{
    background:#132230!important;
    color:var(--text)!important;
    border-color:var(--line)!important;
  }

  /* Drive mobile layout controls are direct functional controls, not proxy buttons. */
  body.route-gallery .drive-mobile-layout-option{pointer-events:auto!important;touch-action:manipulation!important;cursor:pointer!important}
  body.route-gallery .drive-mobile-layout-option svg{pointer-events:none!important}
}

/* 2026-10-03 — final mobile shell consistency v35.
   One palette, web icon language, fixed Drive header, real bottom navigation. */
@media(max-width:800px){
  /* Keep the mobile dark theme on the same blue-black token system everywhere. */
  html[data-theme="modern_dark"]{
    --mobile-shell-bg:var(--surface-main);
    --mobile-shell-panel:var(--surface-sunken);
    --mobile-shell-raised:var(--surface-raised);
    --mobile-shell-selected:var(--surface-selected);
    --mobile-shell-hover:var(--surface-hover);
    --mobile-shell-text:var(--text);
    --mobile-shell-muted:var(--metadata);
    --mobile-shell-line:var(--line);
  }
  html[data-theme="modern_light"],html[data-theme="gray_light"],html[data-theme="arctic"],html[data-theme="rose"],html[data-theme="sand"]{
    --mobile-shell-bg:var(--surface-main);
    --mobile-shell-panel:var(--surface-sunken);
    --mobile-shell-raised:var(--surface-raised);
    --mobile-shell-selected:var(--surface-selected);
    --mobile-shell-hover:var(--surface-hover);
    --mobile-shell-text:var(--text);
    --mobile-shell-muted:var(--metadata);
    --mobile-shell-line:var(--line);
  }

  /* All mobile pages reserve space for the real bottom navigation. */
  .cloud-mobile-bottomnav + main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell):not(.worktrack-sheet-main)>.page-shell{
    padding-bottom:calc(94px + env(safe-area-inset-bottom))!important;
  }

  /* Sidebar always owns the top layer; no sticky/fixed page element may cover it. */
  .app-sidebar{z-index:2600!important}
  .shade{z-index:2550!important}
  body.menu-open .cloud-mobile-bottomnav,
  body.menu-open .drive-mobile-fab-stack{visibility:hidden!important;pointer-events:none!important}

  /* Bottom navigation uses only real app destinations and exact web-sidebar SVG language. */
  .cloud-mobile-bottomnav{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:1700!important;
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;
    padding:7px 8px calc(9px + env(safe-area-inset-bottom))!important;
    border:0!important;border-top:1px solid var(--mobile-shell-line)!important;border-radius:0!important;
    background:var(--mobile-shell-bg)!important;color:var(--mobile-shell-text)!important;box-shadow:none!important;
  }
  .cloud-mobile-bottomnav a,.cloud-mobile-bottomnav button{
    min-width:0!important;min-height:58px!important;margin:0!important;padding:4px 2px 2px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:6px!important;
    border:0!important;border-radius:10px!important;background:transparent!important;color:var(--mobile-shell-muted)!important;
    box-shadow:none!important;text-decoration:none!important;font:inherit!important;font-size:11px!important;font-weight:640!important;line-height:1.1!important;
    appearance:none!important;-webkit-appearance:none!important;
  }
  .cloud-mobile-bottomnav a:active,.cloud-mobile-bottomnav button:active{background:var(--mobile-shell-hover)!important}
  .cloud-mobile-bottomnav a.active{color:var(--mobile-shell-text)!important}
  .cloud-mobile-bottomnav .cloud-mobile-navicon{
    width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;flex:0 0 28px!important;
    display:grid!important;place-items:center!important;border-radius:8px!important;background:transparent!important;color:currentColor!important;
  }
  .cloud-mobile-bottomnav a.active .cloud-mobile-navicon{background:var(--mobile-shell-selected)!important;color:var(--mobile-shell-text)!important}
  .cloud-mobile-bottomnav .cloud-mobile-navicon svg{
    width:16px!important;height:16px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.75!important;stroke-linecap:round!important;stroke-linejoin:round!important;
  }
  .cloud-mobile-bottomnav .cloud-mobile-navicon.navico-sheet svg{stroke:#11B981!important}
  .cloud-mobile-bottomnav .cloud-mobile-navicon.navico-sheet .sheet-fill{fill:#11B981!important;stroke:none!important}
  .cloud-mobile-bottomnav a.active .cloud-mobile-navicon.navico-sheet svg{stroke:#10C98B!important}
  .cloud-mobile-bottomnav a.active .cloud-mobile-navicon.navico-sheet .sheet-fill{fill:#10C98B!important;stroke:none!important}

  /* Drive-specific tokens are aliases of the app tokens, not a second theme. */
  body.route-gallery{
    --drive-mobile-bg:var(--mobile-shell-bg)!important;
    --drive-mobile-shell:var(--mobile-shell-panel)!important;
    --drive-mobile-shell-2:var(--mobile-shell-raised)!important;
    --drive-mobile-row:var(--mobile-shell-panel)!important;
    --drive-mobile-line:var(--mobile-shell-line)!important;
    --drive-mobile-pill:var(--mobile-shell-raised)!important;
    --drive-mobile-pill-2:var(--mobile-shell-selected)!important;
    --drive-mobile-text:var(--mobile-shell-text)!important;
    --drive-mobile-muted:var(--mobile-shell-muted)!important;
    --drive-mobile-accent:var(--mobile-shell-text)!important;
  }

  /* The whole requested top block is truly fixed, not sticky. */
  body.route-gallery .drive-file-header{
    position:fixed!important;inset:0 0 auto 0!important;top:0!important;left:0!important;right:0!important;
    width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;
    margin:0!important;padding:calc(14px + env(safe-area-inset-top)) 16px 12px!important;
    background:var(--mobile-shell-bg)!important;border:0!important;border-bottom:1px solid var(--mobile-shell-line)!important;
    box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
    transform:none!important;transition:none!important;z-index:1750!important;box-sizing:border-box!important;
  }
  body.route-gallery main>.page-shell{
    padding-top:calc(166px + env(safe-area-inset-top))!important;
    background:var(--mobile-shell-bg)!important;
  }
  body.route-gallery .mobile-menu{
    position:fixed!important;top:max(17px,calc(env(safe-area-inset-top) + 17px))!important;left:max(12px,env(safe-area-inset-left))!important;
    z-index:1760!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
    margin:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;color:var(--mobile-shell-text)!important;
    box-shadow:none!important;transform:none!important;transition:none!important;
  }
  body.route-gallery .mobile-menu svg{width:17px!important;height:17px!important;stroke-width:1.75!important}
  body.route-gallery .drive-mobile-searchbar{padding:0 40px 0 48px!important}
  body.route-gallery .drive-mobile-search-pill{
    height:50px!important;min-height:50px!important;border:1px solid transparent!important;border-radius:25px!important;
    background:var(--mobile-shell-raised)!important;color:var(--mobile-shell-text)!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-search-pill:active{background:var(--mobile-shell-hover)!important}
  body.route-gallery .drive-mobile-search-pill svg{width:16px!important;height:16px!important;stroke-width:1.75!important}

  body.route-gallery .drive-mobile-sectionbar{
    margin-top:12px!important;padding:12px 14px!important;min-height:66px!important;
    border:1px solid var(--mobile-shell-line)!important;border-radius:16px!important;background:var(--mobile-shell-panel)!important;
    box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-sectionbar h1{font-size:16px!important;font-weight:700!important;color:var(--mobile-shell-text)!important}
  body.route-gallery .drive-mobile-view-toggle{
    width:116px!important;min-width:116px!important;height:46px!important;padding:3px!important;gap:4px!important;
    border:1px solid var(--mobile-shell-line)!important;border-radius:13px!important;background:var(--mobile-shell-raised)!important;
  }
  body.route-gallery .drive-mobile-layout-option{
    flex:0 0 52px!important;width:52px!important;min-width:52px!important;max-width:52px!important;
    height:38px!important;min-height:38px!important;max-height:38px!important;margin:0!important;padding:0!important;
    border:0!important;border-radius:10px!important;background:transparent!important;color:var(--mobile-shell-muted)!important;
    box-shadow:none!important;transform:none!important;transition:none!important;
  }
  body.route-gallery .drive-mobile-layout-option.active{
    background:var(--mobile-shell-selected)!important;color:var(--mobile-shell-text)!important;box-shadow:none!important;transform:none!important;
  }
  body.route-gallery .drive-mobile-layout-option svg{width:16px!important;height:16px!important;stroke:currentColor!important;stroke-width:1.75!important}

  body.route-gallery .drive-file-viewport{
    margin-top:0!important;border:1px solid var(--mobile-shell-line)!important;border-radius:16px!important;
    background:var(--mobile-shell-panel)!important;box-shadow:none!important;
  }

  /* One floating action only: it opens the app's real New dialog, so nothing is decorative/dead. */
  body.route-gallery .drive-mobile-fab-stack{
    position:fixed!important;right:max(16px,env(safe-area-inset-right))!important;bottom:calc(88px + env(safe-area-inset-bottom))!important;
    z-index:1680!important;display:flex!important;pointer-events:none!important;
  }
  body.route-gallery .drive-mobile-main-fab{
    width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;
    display:grid!important;place-items:center!important;pointer-events:auto!important;
    border:1px solid var(--mobile-shell-line)!important;border-radius:18px!important;background:var(--primary-control-bg)!important;color:var(--primary-control-text)!important;
    box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-main-fab:active{background:var(--primary-control-pressed)!important}
  body.route-gallery .drive-mobile-main-fab svg{width:24px!important;height:24px!important;stroke-width:1.75!important}
  body.route-gallery .drive-mobile-mini-fab{display:none!important}

  /* Remove one-off type coloring: mobile uses the same icon shapes/colors as web. */
  body.route-gallery .gallery.list-view .drive-folder-select,
  body.route-gallery #driveDropTarget.list-view .drive-folder-select,
  body.route-gallery .gallery.list-view .preview.document-preview,
  body.route-gallery #driveDropTarget.list-view .preview.document-preview,
  body.route-gallery .gallery.list-view .preview.audio,
  body.route-gallery #driveDropTarget.list-view .preview.audio,
  body.route-gallery .gallery.list-view .table-preview,
  body.route-gallery #driveDropTarget.list-view .table-preview,
  body.route-gallery .gallery.list-view .drive-kind-tile,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile,
  body.route-gallery .gallery.list-view .drive-file-glyph,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph{
    background:var(--mobile-shell-raised)!important;color:var(--mobile-shell-text)!important;border:0!important;box-shadow:none!important;
  }
  body.route-gallery .gallery.list-view .drive-folder-symbol,
  body.route-gallery #driveDropTarget.list-view .drive-folder-symbol,
  body.route-gallery .gallery.list-view .drive-kind-tile svg,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile svg,
  body.route-gallery .gallery.list-view .drive-file-glyph svg,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph svg,
  body.route-gallery .gallery.list-view .audio-card-icon svg,
  body.route-gallery #driveDropTarget.list-view .audio-card-icon svg{stroke:currentColor!important}
  body.route-gallery .gallery.list-view .drive-kind-tile b,
  body.route-gallery #driveDropTarget.list-view .drive-kind-tile b,
  body.route-gallery .gallery.list-view .drive-file-glyph b,
  body.route-gallery #driveDropTarget.list-view .drive-file-glyph b{color:currentColor!important}

  /* Grid/list geometry remains stable and never causes horizontal page movement. */
  body.route-gallery #driveDropTarget,
  body.route-gallery .drive-file-viewport{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  body.route-gallery #driveDropTarget:not(.list-view){
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding:10px!important;
  }
  body.route-gallery #driveDropTarget:not(.list-view)>.drive-item-section,
  body.route-gallery #driveDropTarget:not(.list-view)>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget:not(.list-view)>.drive-item-section>.drive-files-grid{display:contents!important}
  body.route-gallery #driveDropTarget:not(.list-view) .filecard{min-width:0!important;max-width:100%!important;width:100%!important;margin:0!important}

  /* Menus/dialogs on every dark mobile subpage stay on the same theme tokens. */
  html[data-theme="modern_dark"] dialog:not(.cloud-preview-drawer),
  html[data-theme="modern_dark"] .drive-context-menu,
  html[data-theme="modern_dark"] .global-context-menu,
  html[data-theme="modern_dark"] .drive-selection-more-menu,
  html[data-theme="modern_dark"] .work-card-dropdown,
  html[data-theme="modern_dark"] .kanban-item-menu,
  html[data-theme="modern_dark"] .chat-context-menu,
  html[data-theme="modern_dark"] .message-context-menu,
  html[data-theme="modern_dark"] .sheet-option-pop,
  html[data-theme="modern_dark"] .sheet2-context,
  html[data-theme="modern_dark"] .sheet2-menu-pop,
  html[data-theme="modern_dark"] .share-menu,
  html[data-theme="modern_dark"] .drive-new-menu,
  html[data-theme="modern_dark"] .workspace-menu,
  html[data-theme="modern_dark"] .worktrack-new-floating{
    background:var(--surface-raised)!important;color:var(--text)!important;border-color:var(--line)!important;box-shadow:none!important;
  }
}

/* 2026-10-03 — mobile dark palette + deterministic Drive view v36.
   This is the final authority for phone-size dark surfaces and Grid/List geometry. */
@media(max-width:800px){
  html[data-theme="modern_dark"]{
    /* Same blue-black family used by the mobile Drive home, now inherited by every subpage. */
    --mobile-tone-shell:#101a24!important;
    --mobile-tone-block:#0d1a26!important;
    --mobile-tone-block-2:#132230!important;
    --mobile-tone-raised:#142331!important;
    --mobile-tone-hover:#172a3a!important;
    --app-bg:#101a24!important;
    --app-surface:#0d1a26!important;
    --app-raised:#142331!important;
    --app-selected:#20364a!important;
    --app-line:rgba(255,255,255,.065)!important;
  }

  html[data-theme="modern_dark"] body,
  html[data-theme="modern_dark"] main,
  html[data-theme="modern_dark"] .page-shell,
  html[data-theme="modern_dark"] .worktrack-sheet-main{
    background:#101a24!important;
    color:var(--text)!important;
  }

  /* Mobile page chrome and the most common panel/card shells all use one hierarchy. */
  html[data-theme="modern_dark"] :is(
    header,.compact-head,.file-header,.work-head,.kanban-head,
    .apps-head,.analysis-head,.security-head,.appearance-head,.mail-head,.trash-head,
    .panelcard,.panel,.security-panel,.appearance-section,.analysis-card,.analysis-table,
    .app-card,.tour-card,.auto-command-card,.auto-main,.auto-side,.brain-side-card,.brain-native-main,
    .mail-compose-card,.mail-settings-card,.table-drive-card,.vault-card,.update-card,
    .work-card,.wtrash-card,.voice-card,.kanban-column,.kanban-card,.trash-entry,.unified-trash-card,
    .chat-sidebar,.messenger,.conversation-row,.cloud-share-section,.share-appbar,.share-public-list,
    .table-workbook-frame,.workbook-rail,.sheet2-toolbar,.sheet2-statusbar,.sheet2-workspace,
    .source-head,.source-note,.ve-panel,.ve-runtime-bar
  ){
    border-color:var(--line)!important;
    box-shadow:none!important;
  }
  html[data-theme="modern_dark"] :is(
    .panelcard,.panel,.security-panel,.appearance-section,.analysis-card,.analysis-table,
    .app-card,.tour-card,.auto-command-card,.auto-main,.auto-side,.brain-side-card,
    .mail-compose-card,.mail-settings-card,.table-drive-card,.vault-card,.update-card,
    .work-card,.wtrash-card,.voice-card,.kanban-column,.trash-entry,.unified-trash-card,
    .chat-sidebar,.conversation-row,.cloud-share-section,.table-workbook-frame,.source-note,.ve-panel
  ){
    background:var(--mobile-tone-block)!important;
    color:var(--text)!important;
  }
  html[data-theme="modern_dark"] :is(
    .kanban-card,.automation-row,.app-state,.security-stat,.session-row,
    .workbook-tab-row,.chat-row,.msg,.brain-bubble,.share-message,.scheduled-item
  ){
    background:var(--mobile-tone-raised)!important;
    border-color:var(--line)!important;
    box-shadow:none!important;
  }
  html[data-theme="modern_dark"] :is(
    input,select,textarea,.composer-main,.mobile-chat-switch,.kanban-mobile-tabs button,
    .ghost,.ghost-btn,.icon-btn,.button.secondary
  ){
    border-color:var(--line)!important;
  }
  html[data-theme="modern_dark"] :is(.composer-main,.mobile-chat-switch,.kanban-mobile-tabs button){
    background:var(--mobile-tone-raised)!important;
  }

  /* Bottom bar belongs to the same surface on every subpage. */
  html[data-theme="modern_dark"] .cloud-mobile-bottomnav{
    background:#101a24!important;
    border-top-color:var(--line)!important;
  }

  /* Fixed Drive header never participates in document flow while scrolling. */
  html[data-theme="modern_dark"] body.route-gallery .drive-file-header{
    background:#101a24!important;
  }

  /* Deterministic view state: CSS is driven by data-mobile-view, not by legacy cascade guesses. */
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
    padding:10px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section>.drive-files-grid{
    display:contents!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard.file-tile,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard.drive-folder-card{
    position:relative!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(76px,1fr) auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:154px!important;
    min-height:154px!important;
    max-height:154px!important;
    margin:0!important;
    padding:10px!important;
    border:1px solid var(--mobile-shell-line)!important;
    border-radius:14px!important;
    background:var(--mobile-shell-raised)!important;
    overflow:hidden!important;
    box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.preview,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.drive-folder-select{
    grid-column:1!important;
    grid-row:1!important;
    place-self:center!important;
    width:64px!important;
    height:64px!important;
    min-width:64px!important;
    min-height:64px!important;
    margin:0!important;
    border:0!important;
    border-radius:12px!important;
    background:var(--mobile-shell-panel)!important;
    color:var(--mobile-shell-text)!important;
    overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.preview img{
    width:100%!important;height:100%!important;object-fit:cover!important;border-radius:12px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-copy{
    display:block!important;
    grid-column:1!important;
    grid-row:2!important;
    min-width:0!important;
    padding:8px 28px 0 0!important;
    align-self:end!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-copy>b{
    display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
    color:var(--mobile-shell-text)!important;font-size:12.5px!important;font-weight:670!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-filemeta{
    display:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-more-btn{
    position:absolute!important;right:5px!important;bottom:5px!important;top:auto!important;transform:none!important;
    width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
    border:0!important;border-radius:9px!important;background:transparent!important;color:var(--mobile-shell-muted)!important;
    box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] :is(
    .drive-list-name,.drive-list-owner,.drive-list-kind,.drive-list-size,.drive-list-date,.file-meta-row,.mobile-drive-size,.filetype-corner,.video-play-badge
  ){
    display:none!important;
  }

  body.route-gallery #driveDropTarget[data-mobile-view="list"]{
    display:block!important;
    padding:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section,
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section>.drive-files-grid{
    display:block!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard,
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard.file-tile,
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard.drive-folder-card{
    position:relative!important;
    display:grid!important;
    grid-template-columns:54px minmax(0,1fr)!important;
    grid-template-rows:76px!important;
    width:100%!important;
    min-width:0!important;
    height:76px!important;
    min-height:76px!important;
    max-height:76px!important;
    margin:0!important;
    padding:0 48px 0 10px!important;
    border:0!important;
    border-bottom:1px solid var(--mobile-shell-line)!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard>.preview,
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard>.drive-folder-select{
    grid-column:1!important;grid-row:1!important;place-self:center!important;
    width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
    margin:0!important;border:0!important;border-radius:10px!important;background:var(--mobile-shell-raised)!important;color:var(--mobile-shell-text)!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-copy{
    display:block!important;grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;padding:0 8px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-copy>b{
    display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:var(--mobile-shell-text)!important;font-size:14px!important;font-weight:660!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-filemeta{
    display:flex!important;align-items:center!important;gap:5px!important;margin-top:5px!important;max-width:100%!important;overflow:hidden!important;white-space:nowrap!important;
    color:var(--mobile-shell-muted)!important;font-size:10.8px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-more-btn{
    position:absolute!important;right:6px!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;
    width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--mobile-shell-muted)!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] :is(
    .drive-list-name,.drive-list-owner,.drive-list-kind,.drive-list-size,.drive-list-date,.file-meta-row,.mobile-drive-size,.filetype-corner,.video-play-badge
  ){
    display:none!important;
  }

  /* The two view buttons are always real, tappable controls. */
  body.route-gallery .drive-mobile-layout-option{
    position:relative!important;z-index:2!important;pointer-events:auto!important;touch-action:manipulation!important;user-select:none!important;
  }
}

/* 2026-10-03 — mobile Drive view engine hard stop v35.
   Grid/list is keyed only from data-mobile-view; legacy list-view rules cannot win. */
@media(max-width:800px){
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    gap:10px!important;
    padding:10px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section>.drive-files-grid{display:contents!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:minmax(74px,1fr) auto!important;
    width:100%!important;
    min-width:0!important;
    height:154px!important;
    min-height:154px!important;
    max-height:154px!important;
    padding:10px!important;
    margin:0!important;
    border-radius:14px!important;
    border:1px solid var(--mobile-shell-line,var(--line))!important;
    background:var(--mobile-shell-raised,var(--surface-raised))!important;
    overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.preview,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.drive-folder-select{
    position:relative!important;
    grid-column:1!important;grid-row:1!important;
    place-self:center!important;
    width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;
    margin:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-copy{
    display:block!important;grid-column:1!important;grid-row:2!important;min-width:0!important;padding:8px 28px 0 0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-more-btn{
    position:absolute!important;right:5px!important;bottom:5px!important;top:auto!important;transform:none!important;
  }

  body.route-gallery #driveDropTarget[data-mobile-view="list"]{
    display:block!important;
    padding:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section,
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section>.drive-files-grid{
    display:block!important;width:100%!important;margin:0!important;padding:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard{
    display:grid!important;
    grid-template-columns:54px minmax(0,1fr)!important;
    grid-template-rows:76px!important;
    width:100%!important;min-width:0!important;
    height:76px!important;min-height:76px!important;max-height:76px!important;
    padding:0 48px 0 10px!important;margin:0!important;
    border-radius:0!important;border:0!important;border-bottom:1px solid var(--mobile-shell-line,var(--line))!important;
    background:transparent!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard>.preview,
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard>.drive-folder-select{
    position:relative!important;grid-column:1!important;grid-row:1!important;place-self:center!important;
    width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-copy{
    display:block!important;grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-more-btn{
    position:absolute!important;right:6px!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;
  }
  body.route-gallery .drive-mobile-layout-option{
    cursor:pointer!important;pointer-events:auto!important;touch-action:manipulation!important;
  }
  body.route-gallery .drive-mobile-layout-option.active{
    background:color-mix(in srgb,var(--mobile-shell-text,var(--text)) 14%,var(--mobile-shell-panel,var(--surface-raised)))!important;
    color:var(--mobile-shell-text,var(--text))!important;
  }
}

/* 2026-10-03 — mobile system unification v37.
   This is the authoritative last layer for mobile dark surfaces and Drive grid/list. */
@media (max-width:800px){
  html[data-theme="modern_dark"]{
    --mobile-tone-shell:#101a24!important;
    --mobile-tone-block:#0d1a26!important;
    --mobile-tone-raised:#132330!important;
    --mobile-tone-hover:#182b3a!important;
    --mobile-tone-pressed:#1d3345!important;
    --mobile-tone-selected:#20394d!important;
    --mobile-tone-line:rgba(163,196,222,.11)!important;
    --mobile-tone-line-strong:rgba(163,196,222,.17)!important;
    --mobile-tone-text:#f3f7fb!important;
    --mobile-tone-muted:#aab9c8!important;

    --desktop-bg:#101a24!important;
    --bg:#101a24!important;
    --side:#0d1a26!important;
    --card:#132330!important;
    --panel:#132330!important;
    --soft:#162735!important;
    --surface-main:#101a24!important;
    --surface-raised:#132330!important;
    --surface-sunken:#0d1a26!important;
    --surface-hover:#182b3a!important;
    --surface-pressed:#1d3345!important;
    --surface-selected:#20394d!important;
    --text:#f3f7fb!important;
    --muted:#cbd6e1!important;
    --metadata:#9fb0c1!important;
    --line:rgba(163,196,222,.11)!important;
    --line-strong:rgba(163,196,222,.17)!important;
    --input:#132330!important;
    --menu:#101f2b!important;
    --dialog:#101f2b!important;
    --preview:#0e1c27!important;
    --control-bg:#132330!important;
    --control-hover:#182b3a!important;
    --folder-hover:#182b3a!important;
    --sidebar-bg:#0d1a26!important;
    --sidebar-border:rgba(163,196,222,.11)!important;
    --sidebar-text:#f3f7fb!important;
    --sidebar-muted:#aab9c8!important;
    --sidebar-hover:#162735!important;
    --sidebar-active:#20394d!important;
    --sidebar-active-bg:#20394d!important;
    --sidebar-active-text:#f6f9fc!important;
    --sidebar-icon:#cbd6e1!important;
    --page-surface:#101a24!important;
    --table-line:rgba(163,196,222,.11)!important;
    --input-line:rgba(163,196,222,.14)!important;
  }

  html[data-theme="modern_dark"] body,
  html[data-theme="modern_dark"] main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell),
  html[data-theme="modern_dark"] main:not(.authmain):not(.device-lock-page):not(.panel-preview-shell)>.page-shell{
    background:var(--surface-main)!important;
    color:var(--text)!important;
  }
  html[data-theme="modern_dark"] :is(
    .app-sidebar,.panelcard,.security-panel,.appearance-section,.app-card,.automation-row,
    .kanban-column,.kanban-card,.trash-entry,.wtrash-card,.work-card,.table-drive-card,
    .vault-card,.share-center-row,.scheduled-item,.usercard,.theme-card,.font-card,
    .mail-card,.tour-card,.global-search-popover,.cloud-preview-drawer,.cloud-share-dialog,
    .drive-context-menu,.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,
    .kanban-item-menu,.chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,
    .sheet2-menu-pop,.share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating
  ){
    border-color:var(--line)!important;
    box-shadow:none!important;
  }
  html[data-theme="modern_dark"] :is(
    .panelcard,.security-panel,.appearance-section,.app-card,.automation-row,.kanban-column,.kanban-card,
    .trash-entry,.wtrash-card,.work-card,.table-drive-card,.vault-card,.share-center-row,.scheduled-item,
    .usercard,.theme-card,.font-card,.mail-card,.tour-card
  ){background:var(--surface-raised)!important}
  html[data-theme="modern_dark"] :is(
    dialog,.global-search-popover,.cloud-preview-drawer,.cloud-share-dialog,.drive-context-menu,
    .drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,
    .chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,
    .share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating
  ){background:var(--dialog)!important;color:var(--text)!important}
  html[data-theme="modern_dark"] :is(input,select,textarea){background:var(--input)!important;color:var(--text)!important;border-color:var(--input-line)!important}
  html[data-theme="modern_dark"] :is(header,.compact-head,.file-header){background:var(--surface-main)!important;color:var(--text)!important}

  /* Bottom navigation and drawer share the same mobile palette on every page. */
  .cloud-mobile-bottomnav{
    background:var(--surface-main)!important;
    border-top:1px solid var(--line)!important;
    box-shadow:none!important;
  }
  .cloud-mobile-bottomnav a{color:var(--metadata)!important}
  .cloud-mobile-bottomnav a.active{color:var(--text)!important;background:transparent!important}
  .cloud-mobile-bottomnav .cloud-mobile-navicon,
  .cloud-mobile-bottomnav a.active .cloud-mobile-navicon{background:transparent!important;color:currentColor!important}
  .cloud-mobile-bottomnav .navico svg{fill:none!important;stroke:currentColor!important}
  .cloud-mobile-bottomnav .navico-sheet .sheet-fill{fill:currentColor!important;stroke:none!important}
  .cloud-mobile-bottomnav + main>.page-shell{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}

  .app-sidebar{background:var(--sidebar-bg)!important;color:var(--sidebar-text)!important;border-color:var(--sidebar-border)!important;z-index:2600!important}
  .shade{z-index:2550!important}
  body.menu-open .cloud-mobile-bottomnav,
  body.menu-open .drive-mobile-fab-stack{visibility:hidden!important;pointer-events:none!important}

  /* Drive header never scrolls with the file list. */
  body.route-gallery{
    --drive-mobile-bg:var(--surface-main);
    --drive-mobile-shell:var(--surface-sunken);
    --drive-mobile-panel:var(--surface-raised);
    --drive-mobile-line:var(--line);
    --drive-mobile-pill:var(--surface-raised);
    --drive-mobile-text:var(--text);
    --drive-mobile-muted:var(--metadata);
  }
  body.route-gallery main>.page-shell{
    padding-top:calc(150px + env(safe-area-inset-top))!important;
    padding-left:14px!important;
    padding-right:14px!important;
  }
  body.route-gallery .drive-file-header{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    z-index:1750!important;
    width:auto!important;
    height:calc(144px + env(safe-area-inset-top))!important;
    min-height:calc(144px + env(safe-area-inset-top))!important;
    max-height:calc(144px + env(safe-area-inset-top))!important;
    margin:0!important;
    padding:calc(12px + env(safe-area-inset-top)) 14px 10px!important;
    background:var(--surface-main)!important;
    border:0!important;
    transform:none!important;
    contain:layout paint!important;
  }
  body.route-gallery .mobile-menu{
    position:fixed!important;
    top:calc(17px + env(safe-area-inset-top))!important;
    left:13px!important;
    z-index:1800!important;
    width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
    background:transparent!important;border:0!important;box-shadow:none!important;color:var(--text)!important;
  }
  body.route-gallery .drive-mobile-searchbar{padding:0 42px 0 44px!important}
  body.route-gallery .drive-mobile-search-pill{
    width:100%!important;height:52px!important;min-height:52px!important;
    border:0!important;border-radius:26px!important;
    background:var(--surface-raised)!important;color:var(--text)!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-sectionbar{
    height:62px!important;min-height:62px!important;
    margin-top:10px!important;padding:0 12px 0 16px!important;
    border:1px solid var(--line)!important;border-radius:18px!important;
    background:var(--surface-sunken)!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-sectionbar h1{color:var(--text)!important;font-size:17px!important;font-weight:700!important}
  body.route-gallery .drive-mobile-view-toggle{
    display:flex!important;align-items:center!important;gap:3px!important;
    padding:4px!important;border-radius:16px!important;background:var(--surface-raised)!important;
  }
  body.route-gallery .drive-mobile-layout-option{
    width:46px!important;height:42px!important;min-width:46px!important;min-height:42px!important;
    border:0!important;border-radius:13px!important;background:transparent!important;color:var(--metadata)!important;
    display:grid!important;place-items:center!important;pointer-events:auto!important;touch-action:manipulation!important;
  }
  body.route-gallery .drive-mobile-layout-option.active{
    background:var(--surface-selected)!important;color:var(--text)!important;
  }
  body.route-gallery .drive-mobile-layout-option svg{width:19px!important;height:19px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important}
  body.route-gallery .drive-mobile-layout-option rect,
  body.route-gallery .drive-mobile-layout-option circle{fill:none!important;stroke:currentColor!important}

  body.route-gallery .drive-commandbar,
  body.route-gallery .drive-location-toolbar,
  body.route-gallery .drive-list-header,
  body.route-gallery .drive-pager{display:none!important}
  body.route-gallery .drive-file-viewport{
    width:100%!important;max-width:100%!important;overflow:hidden!important;
    border:1px solid var(--line)!important;border-radius:18px!important;background:var(--surface-sunken)!important;
  }
  body.route-gallery #driveDropTarget{width:100%!important;max-width:100%!important;background:transparent!important}
  body.route-gallery #driveDropTarget .drive-section-heading{display:none!important}

  /* LIST — explicit data state; old class rules cannot override it. */
  body.route-gallery #driveDropTarget[data-mobile-view="list"]{
    display:block!important;padding:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section,
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget[data-mobile-view="list"]>.drive-item-section>.drive-files-grid{
    display:block!important;width:100%!important;margin:0!important;padding:0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard{
    position:relative!important;display:grid!important;
    grid-template-columns:50px minmax(0,1fr)!important;grid-template-rows:72px!important;
    width:100%!important;min-width:0!important;height:72px!important;min-height:72px!important;max-height:72px!important;
    margin:0!important;padding:0 46px 0 8px!important;
    border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;
    background:transparent!important;box-shadow:none!important;overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard:last-child{border-bottom:0!important}
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard>.preview,
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .filecard>.drive-folder-select{
    grid-column:1!important;grid-row:1!important;place-self:center!important;
    width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
    margin:0!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-select .drive-folder-symbol,
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-select svg{
    width:29px!important;height:29px!important;fill:var(--folder-custom,#A5A5A5)!important;stroke:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .folder-color-blue .drive-folder-select svg{fill:#3B82F6!important}
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .folder-color-green .drive-folder-select svg{fill:#22B893!important}
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .folder-color-orange .drive-folder-select svg{fill:#F59E45!important}
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .folder-color-red .drive-folder-select svg{fill:#FF4D4D!important}
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .folder-color-purple .drive-folder-select svg{fill:#9A79DB!important}
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-copy{
    display:block!important;grid-column:2!important;grid-row:1!important;align-self:center!important;min-width:0!important;padding:0 6px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-copy>b{
    display:block!important;color:var(--text)!important;font-size:14px!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .mobile-drive-filemeta{
    display:flex!important;align-items:center!important;gap:5px!important;margin-top:4px!important;
    color:var(--metadata)!important;font-size:10.8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-more-btn{
    position:absolute!important;right:5px!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;
    width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
    border:0!important;border-radius:9px!important;background:transparent!important;color:var(--metadata)!important;box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] :is(
    .drive-list-name,.drive-list-owner,.drive-list-kind,.drive-list-size,.drive-list-date,.file-meta-row,.mobile-drive-size,.filetype-corner,.video-play-badge
  ){display:none!important}

  /* GRID — clearly different from list, two columns and full card content. */
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-flow:row!important;
    align-items:stretch!important;gap:10px!important;padding:10px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section>.drive-folder-grid,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"]>.drive-item-section>.drive-files-grid{display:contents!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard{
    position:relative!important;display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;grid-template-rows:82px minmax(44px,auto)!important;
    width:100%!important;min-width:0!important;height:146px!important;min-height:146px!important;max-height:146px!important;
    margin:0!important;padding:10px!important;
    border:1px solid var(--line)!important;border-radius:14px!important;background:var(--surface-raised)!important;box-shadow:none!important;overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.preview,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .filecard>.drive-folder-select{
    position:relative!important;grid-column:1!important;grid-row:1!important;place-self:center!important;
    width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;
    margin:0!important;border:0!important;border-radius:10px!important;background:transparent!important;box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-folder-select .drive-folder-symbol,
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-folder-select svg{
    width:46px!important;height:46px!important;fill:var(--folder-custom,#A5A5A5)!important;stroke:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .folder-color-blue .drive-folder-select svg{fill:#3B82F6!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .folder-color-green .drive-folder-select svg{fill:#22B893!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .folder-color-orange .drive-folder-select svg{fill:#F59E45!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .folder-color-red .drive-folder-select svg{fill:#FF4D4D!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .folder-color-purple .drive-folder-select svg{fill:#9A79DB!important}
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-copy{
    display:block!important;grid-column:1!important;grid-row:2!important;align-self:end!important;min-width:0!important;padding:5px 28px 0 0!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-copy>b{
    display:block!important;color:var(--text)!important;font-size:12.5px!important;font-weight:650!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .mobile-drive-filemeta{
    display:flex!important;gap:4px!important;margin-top:3px!important;color:var(--metadata)!important;font-size:9.8px!important;white-space:nowrap!important;overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-more-btn{
    position:absolute!important;right:4px!important;bottom:5px!important;top:auto!important;transform:none!important;
    width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:var(--metadata)!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] :is(
    .drive-list-name,.drive-list-owner,.drive-list-kind,.drive-list-size,.drive-list-date,.file-meta-row,.mobile-drive-size,.filetype-corner,.video-play-badge
  ){display:none!important}

  body.route-gallery .drive-mobile-fab-stack{
    position:fixed!important;right:16px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;z-index:1650!important;
  }
  body.route-gallery .drive-mobile-main-fab{
    width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;
    border:0!important;border-radius:18px!important;background:var(--surface-selected)!important;color:var(--text)!important;box-shadow:none!important;
  }
  body.route-gallery .drive-mobile-main-fab svg{width:25px!important;height:25px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important}
}

/* 2026-10-05 — mobile action-surface cleanup v38.
   Mobile menus must be visually owned by the mobile shell: no desktop page/card
   styling bleeding below them, no click-through, and no nested raised cards. */
@media(max-width:800px){
  html,body{
    min-height:100dvh!important;
    background:var(--surface-main)!important;
  }

  /* v16 used to suppress the backdrop for the anchored Drive menus. The menu
     stays anchored to the 3-dot trigger, but the backdrop now remains active. */
  body.mobile-action-menu-open:has(#driveContextMenu.mobile-drive-popover:not([hidden])) .mobile-action-scrim,
  body.mobile-action-menu-open:has(#driveSelectionMoreMenu.mobile-drive-selection-popover:not([hidden])) .mobile-action-scrim{
    display:block!important;
    opacity:1!important;
    pointer-events:auto!important;
    background:rgba(0,0,0,.34)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  html[data-theme="modern_light"] body.mobile-action-menu-open:has(#driveContextMenu.mobile-drive-popover:not([hidden])) .mobile-action-scrim,
  html[data-theme="modern_light"] body.mobile-action-menu-open:has(#driveSelectionMoreMenu.mobile-drive-selection-popover:not([hidden])) .mobile-action-scrim{
    background:rgba(16,26,36,.18)!important;
  }

  /* Drive 3-dot menu: one compact surface, not a stack of desktop-looking cards. */
  body.route-gallery #driveContextMenu.mobile-drive-popover{
    background:var(--dialog)!important;
    color:var(--text)!important;
    border:1px solid var(--line)!important;
    box-shadow:0 18px 44px rgba(0,0,0,.34)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    isolation:isolate!important;
  }
  body.route-gallery #driveContextMenu.mobile-drive-popover .drive-context-group button,
  body.route-gallery #driveContextMenu.mobile-drive-popover .drive-more-actions button{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    margin-top:0!important;
  }
  body.route-gallery #driveContextMenu.mobile-drive-popover .drive-context-group button:active,
  body.route-gallery #driveContextMenu.mobile-drive-popover .drive-more-actions button:active{
    background:var(--surface-pressed)!important;
  }
  body.route-gallery #driveContextMenu.mobile-drive-popover .menu-sep{
    background:var(--line)!important;
    margin:4px 5px!important;
  }

  /* Other mobile action menus inherit the same flat-row rule. Geometry stays
     untouched so existing anchors/bottom sheets and their handlers keep working. */
  :is(.drive-selection-more-menu,.global-context-menu,.work-card-dropdown,.kanban-item-menu,
      .chat-context-menu,.message-context-menu,.sheet-option-pop,.sheet2-context,.sheet2-menu-pop,
      .share-menu,.drive-new-menu,.workspace-menu,.worktrack-new-floating,.global-more-menu)
  :is(button,a){
    box-shadow:none!important;
  }

  /* Keep the application surface and the mobile browser safe-area tint aligned. */
  .cloud-mobile-bottomnav{
    background:var(--surface-main)!important;
    border-top:1px solid var(--line)!important;
    box-shadow:none!important;
    padding-bottom:max(10px,env(safe-area-inset-bottom))!important;
  }
  .cloud-mobile-bottomnav a,.cloud-mobile-bottomnav button{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
}



/* v50.1 — Folder grid shares the quiet tonal treatment on phones/tablets. */
@media (max-width:800px) {
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-folder-grid > .filecard.drive-folder-card:not(.drive-selected):not(.selected):not(.drive-opening) {
    border-color:transparent!important;
    background:var(--drive-folder-tile-bg)!important;
    box-shadow:none!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="grid"] .drive-folder-grid > .filecard.drive-folder-card:not(.drive-selected):not(.selected):not(.drive-opening):hover {
    background:var(--drive-folder-tile-hover)!important;
  }
}


/* v50.3 — Match folder list rows to tonal grid cards on touch viewports.
   Keep 72px touch targets, other file rows, and swipe behavior untouched. */
@media (max-width:800px) {
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-grid {
    box-sizing:border-box!important;
    padding-inline:7px!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-grid > .filecard.drive-folder-card {
    box-sizing:border-box!important;
    margin:3px 0 5px!important;
    border:0!important;border-radius:9px!important;
    background:var(--drive-folder-tile-bg)!important;
    box-shadow:none!important;
    transition:background-color .14s ease!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-grid > .filecard.drive-folder-card:not(.drive-selected):not(.selected):not(.drive-opening):hover {
    background:var(--drive-folder-tile-hover)!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-grid > .filecard.drive-folder-card:is(.drive-selected,.selected) {
    background:var(--surface-selected)!important;
  }
  body.route-gallery #driveDropTarget[data-mobile-view="list"] .drive-folder-grid > .filecard.drive-folder-card > .drive-folder-select {
    background:var(--drive-folder-tile-hover)!important;
  }
}


/* v50.10 — Keep both grid/list thumbnail geometry predictable on mobile.
   The 62px compact view must not crop videos, PDFs, or transparent art. */
@media (max-width:800px) {
  body.route-gallery #driveDropTarget .filecard.file-tile > .preview.image-preview {
    position:relative!important;
    display:block!important;
    isolation:isolate;
    overflow:hidden!important;
  }
  body.route-gallery #driveDropTarget .filecard.file-tile > .preview.image-preview > img {
    position:absolute!important;
    inset:0!important;
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }
  body.route-gallery #driveDropTarget .filecard.file-tile > .preview.thumb-load-error > img {
    visibility:hidden!important;
  }
  body.route-gallery #driveDropTarget .filecard.file-tile > .preview.thumb-load-error::before {
    font-size:9px;
    line-height:1.25;
    padding:3px;
  }
}
