/* Presentation only. No authentication, media, API or data changes. */
body[data-ui-app] :focus-visible{outline:3px solid #2463dc;outline-offset:3px}
body[data-ui-app] .ui-account-menu{position:relative}
body[data-ui-app] .ui-account-menu:not(:has(button:not([hidden]))){display:none}
body[data-ui-app] .ui-account-menu>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 14px;border:1px solid #dce4ef;border-radius:10px;background:#fff;font-size:14px;color:#344968}
body[data-ui-app] .ui-account-menu>summary::-webkit-details-marker{display:none}
body[data-ui-app] .ui-account-menu>summary:after{content:'⌄';margin-left:8px}
body[data-ui-app] .ui-account-menu[open]>.ui-account-content{position:absolute;right:0;top:calc(100% + 6px);z-index:15;display:flex;flex-direction:column;gap:6px;min-width:170px;padding:8px;border:1px solid #dce4ef;border-radius:12px;background:#fff;box-shadow:0 8px 28px #10274720}
body[data-ui-app] .ui-account-content button{min-height:44px;text-align:left;width:100%;white-space:nowrap}
body[data-ui-app] dialog{overscroll-behavior:contain;scrollbar-gutter:stable}

@media(max-width:780px){
 body[data-ui-app]{min-width:0;-webkit-text-size-adjust:100%}
 body[data-ui-app] *,body[data-ui-app] *:before,body[data-ui-app] *:after{box-sizing:border-box}
 body[data-ui-app] button{min-height:44px;touch-action:manipulation}
 body[data-ui-app] input:not([type=checkbox]):not([type=radio]):not([type=range]),body[data-ui-app] textarea,body[data-ui-app] select{font-size:16px!important;max-width:100%}
 body[data-ui-app] :is(input[type=search],input[type=password],input[type=text],select){min-height:44px}
 body[data-ui-app] :is(h1,h2,h3,p,dd,code){overflow-wrap:anywhere}
 body[data-ui-app] :is(.password-row,.password-field){min-width:0}
 body[data-ui-app] :is(.password-row,.password-field)>input{min-width:0;flex:1}
 body[data-ui-app] dialog:not(.photo-viewer):not(.discovery-map):not(.photo-care):not(.photos-sheet):not(.preview-dialog){max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:20px 16px;overflow:auto}
 body[data-ui-app] :is(.dialog-actions,.modal-actions){flex-wrap:wrap;gap:8px}
 body[data-ui-app] :is(.dialog-actions,.modal-actions)>button{flex:1 1 130px;white-space:normal;line-height:1.4}
 body[data-ui-app] :is(.close,.preview-close){min-width:44px;min-height:44px}
 body[data-ui-app] .mobile-app-dock{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}

 /* Management: compact cards retain every field and action. */
 body[data-ui-app=manage]>.shell,body[data-ui-app=backups]>.shell{padding:16px 12px calc(24px + env(safe-area-inset-bottom));width:100%;max-width:1200px}
 body[data-ui-app=manage] .shell>header,body[data-ui-app=backups] .shell>header{margin-bottom:16px}
 body[data-ui-app=manage] .shell>header .eyebrow{margin:0 0 5px;font-size:10px}
 body[data-ui-app=manage] h1,body[data-ui-app=backups] h1{font-size:24px;line-height:1.3;margin:0 0 8px}
 body[data-ui-app=manage] .shell>header .muted{font-size:13px;margin:0;line-height:1.6}
 body[data-ui-app=manage] .top-links{margin-top:12px;gap:8px;align-items:center;flex-wrap:nowrap}
 body[data-ui-app=manage] .top-links>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 10px;background:#fff;border:1px solid #dce4ef;border-radius:10px;font-size:13px;white-space:nowrap}
 body[data-ui-app=manage] .ui-account-menu{margin-left:auto}
 body[data-ui-app=manage] .view-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin-bottom:14px;padding:3px;background:#eaf0f8;border:0;border-radius:12px}
 body[data-ui-app=manage] .view-nav button{padding:8px 4px;font-size:13px;border-radius:9px;white-space:normal;line-height:1.4}
 body[data-ui-app=manage] .view-nav .selected{background:#fff;box-shadow:0 1px 4px #1b355a10}
 body[data-ui-app=manage] .panel{padding:14px 12px;margin-bottom:14px}
 body[data-ui-app=manage] #applications>.section-head{gap:8px;margin-bottom:12px}
 body[data-ui-app=manage] #applications>.section-head h2{font-size:19px}
 body[data-ui-app=manage] #applications>.section-head p{margin:5px 0 0;font-size:12px;line-height:1.5}
 body[data-ui-app=manage] .search-label{margin:0 0 12px;font-size:13px}
 body[data-ui-app=manage] .apps-table tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px 12px;padding:13px;margin-bottom:10px;border-radius:13px}
 body[data-ui-app=manage] .apps-table td:first-child{grid-column:1/-1;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
 body[data-ui-app=manage] .apps-table .name-link{font-size:17px;min-height:44px;text-align:left;padding:0;line-height:1.3}
 body[data-ui-app=manage] .apps-table td:first-child .muted,body[data-ui-app=manage] .apps-table td:first-child small{margin:0;font-size:11px}
 body[data-ui-app=manage] .apps-table td:nth-child(2){grid-column:1/-1;min-width:0}
 body[data-ui-app=manage] .apps-table td:nth-child(2):before{display:none}
 body[data-ui-app=manage] .apps-table td:nth-child(2) a{font-size:12px;overflow-wrap:anywhere;line-height:1.5;display:block}
 body[data-ui-app=manage] .apps-table td:nth-child(3){grid-column:1;grid-row:auto}
 body[data-ui-app=manage] .apps-table td:nth-child(4){grid-column:2;grid-row:auto}
 body[data-ui-app=manage] .apps-table td:nth-child(5){grid-column:1;grid-row:auto;font-size:12px}
 body[data-ui-app=manage] .apps-table td:last-child{grid-column:2;grid-row:auto;align-self:end}
 body[data-ui-app=manage] .apps-table td:last-child button{min-height:44px;font-size:13px;margin:0;padding:9px}
 body[data-ui-app=manage] .table-wrap td:before{font-size:11px;margin-bottom:3px}
 body[data-ui-app=manage] .detail-heading{flex-wrap:wrap;gap:10px}
 body[data-ui-app=manage] .detail-heading>div{flex:1 1 200px;min-width:0}
 body[data-ui-app=manage] .detail-heading h2{font-size:24px}
 body[data-ui-app=manage] .detail-heading .button{min-height:44px;display:inline-flex;align-items:center}
 body[data-ui-app=manage] .secret-value{min-width:0;max-width:100%;overflow-wrap:anywhere}
 body[data-ui-app=manage] .row-actions{flex-wrap:wrap;gap:8px}
 body[data-ui-app=backups] .header-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
 body[data-ui-app=backups] .header-actions a{min-height:44px;display:inline-flex;align-items:center;padding:8px}
 body[data-ui-app=backups] .protection-grid{gap:10px}
 body[data-ui-app=backups] .protection-grid article,body[data-ui-app=backups] .job{padding:14px}
 body[data-ui-app=backups] .scope{gap:8px}
 body[data-ui-app=backups] .scope-option{padding:12px;min-height:60px}

 /* Album: retain media gestures and every control, expand touch targets only. */
 body[data-ui-app=photos].photos-native .brand strong{font-size:29px;letter-spacing:-.6px}
 body[data-ui-app=photos].photos-native .topbar{padding-top:calc(10px + env(safe-area-inset-top));gap:4px}
 body[data-ui-app=photos].photos-native .album-browse-tools{gap:8px;padding:6px 12px;flex-wrap:nowrap;justify-content:space-between}
 body[data-ui-app=photos].photos-native .album-levels{flex:1;display:flex;min-width:0;max-width:350px}
 body[data-ui-app=photos].photos-native .album-levels button{flex:1;min-width:0;min-height:44px;padding:6px 8px;font-size:13px}
 body[data-ui-app=photos].photos-native .album-browse-tools>button{flex-shrink:0;padding:8px 10px;font-size:13px}
 body[data-ui-app=photos].photos-native .photos-tabbar{max-width:calc(100% - 24px);padding-bottom:4px}
 body[data-ui-app=photos].photos-native .photos-sheet{scroll-padding-top:75px;scroll-padding-bottom:30px}
 body[data-ui-app=photos].photos-native .photos-sheet>header{gap:12px}
 body[data-ui-app=photos].photos-native .photos-sheet h2{font-size:23px}
 body[data-ui-app=photos].photos-native .photos-sheet .import-buttons{gap:8px}
 body[data-ui-app=photos].photos-native .photos-sheet .import-buttons>button{flex:1 1 120px;white-space:normal}
 body[data-ui-app=photos].photos-native .photo-care{scroll-padding-top:80px;scroll-padding-bottom:150px}
 body[data-ui-app=photos].photos-native .photo-care button{min-height:44px}
 body[data-ui-app=photos].photos-native .photo-care .care-head{gap:8px;padding:12px 0}
 body[data-ui-app=photos].photos-native .photo-care h2{font-size:23px}
 body[data-ui-app=photos].photos-native .photo-care .care-state{font-size:13px;padding:10px 12px}
 body[data-ui-app=photos].photos-native .photo-care .care-tabs{margin:12px 0}
 body[data-ui-app=photos].photos-native .photo-care .care-candidate>label{min-height:44px;line-height:1.4}
 body[data-ui-app=photos].photos-native .photo-care .care-bulkbar{gap:8px}
 body[data-ui-app=photos].photos-native .photo-care .care-bulkbar button{min-height:44px;white-space:normal}
 body[data-ui-app=photos].photos-native .photo-viewer>footer{flex-wrap:wrap;gap:6px;padding-bottom:max(8px,env(safe-area-inset-bottom))}
 body[data-ui-app=photos].photos-native .viewer-tools{min-width:0;flex-wrap:wrap;justify-content:center}
 body[data-ui-app=photos].photos-native .photo-viewer .viewer-tools button{min-height:44px;font-size:13px}
 body[data-ui-app=photos].photos-native .viewer-more{min-height:44px;display:flex;align-items:center}
 body[data-ui-app=photos].photos-native .discovery-map{grid-template-rows:auto auto auto minmax(100px,1fr) auto auto auto;gap:6px}
 body[data-ui-app=photos].photos-native .discovery-map>header{grid-row:1}
 body[data-ui-app=photos].photos-native .discovery-map>.discovery-status{grid-row:2}
 body[data-ui-app=photos].photos-native .discovery-map-tools{position:static;grid-row:3;max-width:100%;justify-content:flex-end;gap:8px}
 body[data-ui-app=photos].photos-native .discovery-map-tools button{min-height:44px;font-size:13px;padding:8px 12px}
 body[data-ui-app=photos].photos-native .discovery-map-canvas{grid-row:4;min-height:100px}
 body[data-ui-app=photos].photos-native .discovery-map>.discovery-note{grid-row:5}
 body[data-ui-app=photos].photos-native .discovery-map>h3{grid-row:6}
 body[data-ui-app=photos].photos-native .discovery-map .discovery-near{grid-row:7;height:86px}
 body[data-ui-app=photos].photos-native .leaflet-control-zoom a{width:44px;height:44px;line-height:44px}

 /* File workflows: keep actions visible, no hover-only operation on touch. */
 body[data-ui-app=files] .filter-controls select{min-height:44px}
 body[data-ui-app=files] .row-menu>summary{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
 body[data-ui-app=files] .file-tools-bar{flex-wrap:wrap;gap:8px}
 body[data-ui-app=files] .transfer-heading{gap:8px}
 body[data-ui-app=files] .transfer-tools{flex-wrap:wrap;gap:8px}
 body[data-ui-app=files] .row-menu-popover button{width:100%;text-align:left;min-height:44px}
 body[data-ui-app=explorer] .titlebar{height:auto;min-height:54px;gap:8px;padding:6px 12px;flex-wrap:wrap}
 body[data-ui-app=explorer] .titlebar h1{font-size:16px;flex:1}
 body[data-ui-app=explorer] .addressbar{gap:8px}
 body[data-ui-app=explorer] .nav-buttons button,body[data-ui-app=explorer] #sidebarToggle{width:44px;min-width:44px;min-height:44px}
 body[data-ui-app=explorer] .commandbar{gap:6px;padding:8px 10px}
 body[data-ui-app=explorer] .commandbar>button{font-size:13px;padding:8px 10px;min-height:44px}
 body[data-ui-app=explorer] .commandbar .sort-control{min-width:0}
 body[data-ui-app=explorer] .view-switch button{width:44px;min-height:44px}
 body[data-ui-app=explorer] .file-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px}
 body[data-ui-app=explorer] .file-item .item-menu{opacity:1;min-width:44px;min-height:44px;top:0;right:0}
 body[data-ui-app=explorer] .file-item .select-box{opacity:1;width:22px;height:22px;top:11px;left:9px}
 body[data-ui-app=explorer] .file-grid .file-item{padding-top:44px}
 body[data-ui-app=explorer] .statusbar{min-height:48px}
 body[data-ui-app=explorer] .context-menu{max-height:65dvh;overflow:auto}
 body[data-ui-app=explorer] .context-menu button{min-height:44px}

 /* Other applications retain their existing navigation and editors. */
 body[data-ui-app=home] .app-card{padding:14px;gap:12px}
 body[data-ui-app=home] .card-bottom a{min-height:44px;display:inline-flex;align-items:center}
 body[data-ui-app=notes] .editor-header{gap:6px}
 body[data-ui-app=notes] .editor-actions{gap:4px;min-width:0}
 body[data-ui-app=notes] .editor-actions .button{padding:8px 10px}
 body[data-ui-app=notes] .ql-toolbar.ql-snow .ql-formats>button{width:44px;height:44px}
 body[data-ui-app=notes] .note-menu>summary{min-width:44px;min-height:44px}
 body[data-ui-app=notes] .modal-actions{padding-bottom:env(safe-area-inset-bottom)}
 body[data-ui-app=learn] .news-button,body[data-ui-app=learn] #directory-open,body[data-ui-app=learn] #directory-close{min-width:44px;min-height:44px}
 body[data-ui-app=learn] .site-name{min-width:0;overflow-wrap:anywhere}
 body[data-ui-app=learn] .rating-controls{flex-wrap:wrap}
 body[data-ui-app=learn] .pagination{flex-wrap:wrap;gap:8px}
 body[data-ui-app=meetings] .toolbar .actions{flex-wrap:wrap;gap:8px}
 body[data-ui-app=meetings] .toolbar .search-bar{flex:1 1 100%;width:100%;min-width:0}
 body[data-ui-app=meetings] .meeting-card-actions,body[data-ui-app=meetings] .meeting-actions{gap:8px}
 body[data-ui-app=meetings] .composer-toolbar{flex-wrap:wrap;gap:4px}
 body[data-ui-app=meetings] .composer-toolbar button{min-width:44px;min-height:44px}
 body[data-ui-app=meetings] .thread-summary{flex-wrap:wrap}
}
@media(max-width:360px){
 body[data-ui-app=manage] .top-links{gap:5px}
 body[data-ui-app=manage] .top-links>a{padding:8px;font-size:12px}
 body[data-ui-app=manage] .ui-account-menu>summary{padding:8px 10px;font-size:12px}
 body[data-ui-app=manage] .view-nav button{font-size:12px}
 body[data-ui-app=photos].photos-native .album-levels button{padding:6px 5px}
 body[data-ui-app=photos].photos-native .photo-care .care-bulkbar .quiet{flex-basis:40%}
 body[data-ui-app=photos].photos-native .photo-care .care-bulkbar .care-review-button{flex-basis:100%}
 body[data-ui-app=notes] .save-status{max-width:65px;font-size:11px;overflow-wrap:anywhere}
}
@media(max-width:780px) and (max-height:520px){
 body[data-ui-app=photos].photos-native .discovery-map{overflow:auto;grid-template-rows:auto auto auto minmax(120px,1fr) auto auto auto}
 body[data-ui-app=photos].photos-native .discovery-map .discovery-near{height:64px}
}
@media(prefers-reduced-motion:reduce){body[data-ui-app]{scroll-behavior:auto}}

/* Narrow-screen verification follow-up: readable title and path/tree touch targets. */
@media(max-width:780px){
 body[data-ui-app=files] .breadcrumbs button{min-height:44px}
 body[data-ui-app=explorer] .titlebar h1{flex:1 1 calc(100% - 40px);min-width:0;white-space:nowrap}
 body[data-ui-app=explorer] .titlebar .original-link{min-height:44px;display:inline-flex;align-items:center}
 body[data-ui-app=explorer] .path-form{height:auto;min-height:44px}
 body[data-ui-app=explorer] #pathInput{min-height:44px}
 body[data-ui-app=explorer] .tree-line .disclose{min-width:44px;min-height:44px}
}
