/* ===== Phone / touch layout (html.touch is set by js/touch.js; also used inside the iOS app) ===== */
.touch,.touch body{overscroll-behavior:none}
.touch body.labpage{position:fixed;inset:0 0 auto 0;height:var(--vvh,100dvh);touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
.touch #labroot{height:100%}

/* ---- lab chrome ---- */
.touch .lb-top{gap:8px;padding:6px 10px;padding-top:calc(6px + env(safe-area-inset-top));min-height:44px}
.touch .lb-top #btn-reset,.touch .lb-top #btn-panel,.touch .lb-meta,.touch .lb-stat,.touch .vmbar{display:none}
.touch .lb-back{padding:8px 6px;font-size:15px}
.touch .lb-title h1{font-size:15px}
.touch .lb-prog{padding:6px 12px;font-size:13px}
.tasknow{display:flex;align-items:center;gap:10px;padding:7px 12px;background:#0f766e;color:#fff;font-size:13.5px;flex:none;cursor:pointer}
.tn-n{width:22px;height:22px;border-radius:50%;background:#fff;color:#0f766e;font-weight:700;font-size:12px;display:flex;align-items:center;justify-content:center;flex:none}
.tn-t{flex:1;min-width:0;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tn-c{flex:none;font-size:12px;opacity:.9;font-variant-numeric:tabular-nums}
.touch.kb .tasknow{display:none}
.touch .vmscreen{overflow:hidden}
.touch .vmscreen .vm{min-width:0;min-height:0}
.touch .lb-panel{position:fixed;left:0;right:0;bottom:0;top:auto;width:100%;height:min(82%,640px);border:none;border-radius:16px 16px 0 0;z-index:100000;box-shadow:0 -12px 40px #000a;padding-bottom:env(safe-area-inset-bottom);animation:sheetin .22s}
@keyframes sheetin{from{transform:translateY(40%);opacity:.4}}
.sheet-shade{position:fixed;inset:0;background:#050a12a6;z-index:99999}
body.nopanel .sheet-shade{display:none}
.sheet-grab{order:-1;flex:none;padding:8px 0 2px;display:flex;justify-content:center}
.sheet-grab span{width:40px;height:5px;border-radius:3px;background:#c9d1dc}
.sheet-btns{display:flex;gap:8px;margin-top:12px}
.sheet-btns .lbtn{flex:1;text-align:center;padding:12px;font-size:15px;background:#fff;color:#0e1a2b;border-color:#cfd6df}
.sheet-btns .lbtn.primary{background:#0f766e;border-color:#0f766e;color:#fff}
.touch .pn-head{padding-top:8px}
.touch .task-h{padding:13px 12px}
.touch .hintbtn{padding:6px 0}
.touch .lb-toasts{top:calc(54px + env(safe-area-inset-top));width:calc(100% - 24px)}
.touch .lb-card{padding:24px 18px}

/* ---- desktop becomes a single-app screen with a dock ---- */
.touch .desk,.touch .skin-server .desk{inset:0 0 58px 0}
.touch .taskbar,.touch .skin-server .taskbar{height:58px;padding-bottom:0}
.touch .tb-left,.touch .tb-tray,.touch .tb-start,.touch .tb-search,.touch .tb-srch,.touch .taskbar>.grow,.touch .startmenu{display:none!important}
.touch .tb-center{flex:1;display:flex;justify-content:space-around;align-items:stretch;height:100%;gap:0}
.touch .tb-btn,.touch .skin-server .tb-btn{width:auto;flex:1;height:100%;flex-direction:column;gap:3px;border-radius:0}
.touch .tb-btn label{font-size:10.5px;line-height:1;pointer-events:none;white-space:nowrap}
.touch .skin-win11 .tb-btn.act{background:#ffffffd0;box-shadow:none}
.touch .skin-win11 .tb-app.run::after,.touch .skin-server .tb-app.run::after{bottom:auto;top:0;left:25%;right:25%;width:auto;margin:0;height:3px;border-radius:0 0 3px 3px}
.touch.kb .taskbar{display:none}
.touch.kb .desk{inset:0}
.touch .dicons{inset:14px;flex-direction:row;gap:10px}
.touch .dicon{width:84px;padding:8px 2px}
.touch .dicon label{font-size:12.5px}
.touch .win:not(.dlg){left:0!important;top:0!important;width:100%!important;height:100%!important;border:none;border-radius:0;box-shadow:none;min-width:0}
.touch .win:not(.dlg)>.win-title{display:none}
.touch .win.edge>.win-title{display:flex;height:36px;background:#dfe3ea}
.touch .win-btns,.touch .win-rs,.touch .eg-prof,.touch .eg-favs{display:none}
.touch .win.dlg>.win-title .win-btns{display:flex}
.touch .win.dlg{left:50%!important;top:50%!important;transform:translate(-50%,-50%);max-width:calc(100% - 14px);max-height:calc(100% - 10px);min-width:0}
.touch .win.dlg>.win-title{height:38px}
.touch .win.dlg .win-ttext{font-size:14px}
.touch .dlg-content{font-size:14px}
.touch .dlg-btns{padding:10px 12px 12px}
.touch .wbutton{height:38px;min-width:84px;font-size:14.5px;border-radius:8px}
.touch .vm .winput,.touch .vm .dlg-content input:not([type=checkbox]):not([type=radio]),.touch .vm .dlg-content select{min-height:36px;font-size:16px}
.touch .dlg-content label{font-size:13.5px}
.touch .vm input[type=checkbox],.touch .vm input[type=radio]{width:18px;height:18px}

/* ---- menus become action sheets ---- */
.ctxshade{position:absolute;inset:0;background:#0006;z-index:99998}
.touch .ctxmenu.sheet{position:absolute;left:8px;right:8px;bottom:8px;top:auto;max-height:72%;overflow:auto;border-radius:14px;padding:6px;font-size:16px;background:#f9f9f9;border:none;box-shadow:0 10px 40px #0008;animation:sheetin .18s}
.touch .ctxmenu.sheet .ctxitem{height:48px;padding:0 14px;border-radius:9px}
.touch .ctxmenu.sheet .ctxitem:active{background:#0000001a}
.touch .ctxmenu.sheet .ctxico{display:none}
.touch .ctxmenu.sheet .ctxlbl{flex:1}
.touch .ctxmenu.sheet .ctxsep{margin:4px 10px}
.ctxtitle{padding:8px 14px 6px;font-size:12.5px;color:#666;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---- shared drill-down lists (Registry Editor, AD Users and Computers) ---- */
.touch .menubar,.touch .mmc-tools,.touch .mmc-tree,.touch .statusbar{display:none}
.t-bar{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#f3f3f3;border-bottom:1px solid #dcdcdc;flex:none}
.t-btn{height:36px;padding:0 12px;border-radius:8px;border:1px solid #c8c8c8;background:#fff;font-size:14px!important;white-space:nowrap;flex:none}
.t-btn.primary{background:#0067c0;border-color:#0067c0;color:#fff!important;font-weight:600}
.t-title{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.t-title b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-title span{font-size:11px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-sect{padding:12px 14px 5px;font-size:11.5px;font-weight:700;color:#5b6b80;text-transform:uppercase;letter-spacing:.05em;background:#f7f8fa;border-bottom:1px solid #e6e8ec}
.t-none{padding:12px 14px;color:#777;font-size:13.5px}
.t-more{width:44px;display:flex;align-items:center;justify-content:center;color:#555;font-size:13px;letter-spacing:1px;align-self:stretch;flex:none}
.t-chev{color:#9aa3ad;font-size:18px;padding:0 4px 2px 0;flex:none}
.touch .tnode.t-row{height:50px;padding:0 8px 0 12px;border-bottom:1px solid #eceef1}
.touch .tnode.t-row .tl{flex:1;min-width:0;height:100%;gap:10px;border:none;background:none!important;font-size:15px}
.touch .tnode.t-row .tname{overflow:hidden;text-overflow:ellipsis}
.touch .vm .tnode input,.touch .vm .lv td input{height:32px;font-size:16px;width:100%}
.touch .re-addr{height:34px;border-left:none;border-right:none}
.touch .vm .re-addr input{font-size:13px;padding:0 12px}
.touch .re-main{flex-direction:column;overflow:auto;-webkit-overflow-scrolling:touch}
.touch .re-tree{width:auto;min-width:0;border:none;overflow:visible;flex:none;padding:0}
.touch .re-list{overflow:visible;flex:none;display:flex;flex-direction:column}
.touch .re-list .t-sect{order:-1}
.touch .mmc-list{-webkit-overflow-scrolling:touch}
.touch table.lv,.touch .lv tbody{display:block;width:100%}
.touch .lv colgroup,.touch .lv thead{display:none}
.touch .lv tr{display:grid;grid-template-columns:minmax(0,1fr) auto 40px;align-items:center;padding:8px 0 8px 12px;border-bottom:1px solid #eceef1;min-height:50px}
.touch .lv td{height:auto;padding:0;min-width:0}
.touch .lv td:nth-child(1){grid-column:1;grid-row:1;font-size:15px}
.touch .lv td:nth-child(2){grid-column:2;grid-row:1;font-size:11.5px;color:#5b6b80;padding-left:8px}
.touch .lv td:nth-child(3){grid-column:1/3;grid-row:2;font-size:12.5px;color:#5b6b80;padding-top:2px}
.touch .lv td:nth-child(3):empty{display:none}
.touch .lv td.t-more{grid-column:3;grid-row:1/3}
.touch .lv td .cellico{margin-right:9px;vertical-align:-5px}
.touch .lv tr.sel td{background:none}
.touch .lv tr.sel{background:#e5f1fb}

/* ---- PowerShell: command builder above the keyboard ---- */
.touch .ps-screen{font-size:12px;padding:6px}
.touch .vm .ps-in{font-size:16px;transform-origin:left center;font-size:12px}
.pk{flex:none;background:#1c1c1e;border-top:1px solid #000;padding-top:6px;user-select:none;-webkit-user-select:none}
.pk-sug{display:flex;gap:6px;overflow-x:auto;padding:0 8px 6px;scrollbar-width:none;-webkit-overflow-scrolling:touch;min-height:40px}
.pk-sug::-webkit-scrollbar,.pk-keys::-webkit-scrollbar{display:none}
.pk-chip{flex:none;padding:8px 11px;border-radius:8px;background:#3a3a3c;color:#fff;font:13px/1.2 "Cascadia Mono",Menlo,Consolas,monospace;white-space:nowrap}
.pk-chip.verb{background:#0a4a8f}
.pk-chip.param{background:#4a3d00;color:#f9f1a5}
.pk-chip:active,.pk-key:active{filter:brightness(1.5)}
.pk-row{display:flex;align-items:flex-start}
.pk-keys{flex:1;min-width:0;display:flex;gap:5px;overflow-x:auto;padding:0 8px 7px;scrollbar-width:none}
.pk-key{flex:none;min-width:36px;height:38px;border-radius:7px;background:#48484a;color:#fff;display:flex;align-items:center;justify-content:center;font:16px "Cascadia Mono",Menlo,Consolas,monospace}
.pk-key.wide{padding:0 10px;font-size:13px}
.pk-run{flex:none;height:38px;margin:0 8px 7px 0;padding:0 14px;border-radius:7px;background:#0f6cbd;color:#fff;font-weight:600;font-size:14px;display:flex;align-items:center}

/* ---- Edge + admin portals ---- */
.touch .eg-strip{padding-left:4px}
.touch .eg-tab{max-width:170px;height:30px}
.touch .eg-bar{padding:5px 6px}
.touch .eg-addr{height:34px}
.touch .eg-nb{width:34px;height:34px}
.touch .pt-top .pt-ti[title="Settings"],.touch .pt-top .pt-ti[title="Help"],.touch .pt-top .pt-ti[title="Feedback"],.touch .pt-top .pt-ti[title="Cloud Shell"],.touch .pt-acct>div,.touch .pt-top>.grow{display:none}
.touch .pt-top,.touch .pt-admin .pt-top{height:46px}
.touch .pt-ti{width:42px}
.touch .pt-brand{font-size:14px!important;padding:0 6px 0 2px;max-width:112px;overflow:hidden;text-overflow:ellipsis}
.touch .pt-search{flex:1;min-width:0;margin:0 4px;height:34px}
.touch .vm .pt-search input{font-size:14px}
.touch .pt-sres{position:fixed;left:8px;right:8px;width:auto}
.touch .pt-acct{padding:0 8px 0 4px}
.touch .pt-flyhost,.touch .pt-admin .pt-flyhost{top:46px}
.touch .pt-admin .pt-nav{position:absolute;left:0;top:0;bottom:0;width:270px;box-shadow:4px 0 14px #0003;z-index:25;transform:translateX(-105%);transition:transform .15s}
.touch .pt-admin.navopen .pt-nav{transform:none}
.touch .pt-admin.navopen .pt-navshade{display:block}
.touch .pt-azure .pt-nav{width:270px}
.touch .pt-navitem{min-height:42px;font-size:14px}
.touch .pt-main{-webkit-overflow-scrolling:touch;font-size:14px}
.touch .bl{padding:0 12px}
.touch .bl-head h1{font-size:18px;line-height:24px}
.touch .bl-pin{display:none}
.touch .bl-crumbs{white-space:nowrap;overflow-x:auto;scrollbar-width:none}
.touch .bl-split{margin:0 -12px;flex-direction:column}
.touch .bl-menu{width:auto;display:flex;overflow-x:auto;border-right:none;border-bottom:1px solid #edebe9;padding:0 6px;flex:none;scrollbar-width:none}
.touch .bl-menu::-webkit-scrollbar{display:none}
.touch .bl-msearch,.touch .bl-mhead,.touch .bl-mitem.dis{display:none}
.touch .bl-mitem{flex:none;white-space:nowrap;height:42px;padding:0 10px;border-left:none!important;border-bottom:3px solid transparent;font-size:13.5px}
.touch .bl-mitem.on{border-bottom-color:#0078d4;background:none}
.touch .bl-split>.bl-content{padding:0 12px 20px}
.touch .cmdbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.touch .cmdbar::-webkit-scrollbar{display:none}
.touch .cmdbar .cmd{flex:none;height:38px;font-size:13.5px}
.touch .kv{grid-template-columns:1fr;gap:7px}
.touch .kvrow .k,.touch .kv.one .kvrow .k,.touch .az-props .kvrow .k{width:42%}
.touch .form{max-width:none}
.touch .fld{flex-direction:column;gap:4px;margin:12px 0}
.touch .fld>label{width:auto;padding:0;font-weight:600}
.touch .fctl{max-width:none!important;width:100%}
.touch .vm .inp{height:40px;font-size:16px}
.touch .vm textarea.inp{height:auto}
.touch .vm .btn{height:40px;font-size:14px}
.touch .seg span{padding:8px 16px}
.touch .radio,.touch .check{padding:5px 0}
.touch .gridwrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.touch .gridbar{position:sticky;left:0}
.touch .gridfilter{flex:1;min-width:160px;height:36px}
.touch .vm .gridfilter input{font-size:15px}
.touch table.grid{min-width:520px}
.touch .grid td{padding:11px 10px}
.touch .grid th .sort{display:none}
.touch .tabs,.touch .wz-tabs.azure,.touch .wz-tabs.steps{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;white-space:nowrap}
.touch .tabs>*,.touch .wz-tabs>*{flex:none}
.touch .tab,.touch .wz-tab{padding-top:10px;padding-bottom:10px}
.touch .wz-foot{margin:0 -12px -20px;padding:10px 12px;flex-wrap:wrap}
.touch .pt-fly{width:100%!important;max-width:100%}
.touch .fly-foot .btn{flex:1}
.touch .pt-toasts{left:8px;right:8px;width:auto;top:54px}
.touch .pick-row{padding-top:9px;padding-bottom:9px}
.touch .lb-toasts{top:auto;bottom:calc(68px + env(safe-area-inset-bottom))}
.touch .skin-win11 .tb-btn:hover,.touch .skin-server .tb-btn:hover{background:none;box-shadow:none}
.touch .skin-win11 .tb-btn.act{background:#fff;box-shadow:none}
.touch .tb-btn.act label{font-weight:700}
.touch .skin-win11 .tb-btn.act label{color:#0067c0}
.touch .skin-server .tb-app.act{background:#ffffff2e}
.touch .wz-foot{flex-wrap:nowrap;overflow-x:auto;gap:6px}.touch .wz-foot .btn{flex:none;padding:0 12px}

/* ---- firmware, Windows Setup, OOBE ---- */
.touch .bm-box{min-width:0;width:94%}
.touch .bm-item{white-space:normal;padding:11px 14px;line-height:1.3}
.touch .bm-help{font-size:11px}
.touch .fw-key,.touch .bm-btn>*{padding:11px 16px}
.touch .ws-win{width:96%;height:min(560px,94%)}
.touch .ws-body{padding:14px 16px 6px}
.touch .ws-form{grid-template-columns:minmax(0,1fr);gap:4px}
.touch .ws-form label{text-align:left;margin-top:8px}
.touch .ws-form select,.touch .ws-form input{width:100%;min-height:36px;font-size:16px}
.touch .ws-foot button,.touch .ws-body button{min-height:38px;font-size:14.5px}
.touch .ws-f10{padding:8px 10px;bottom:8px;left:8px;background:#0006}
.touch .ob-card{width:94%;height:94%;flex-direction:column}
.touch .ob-art{display:none}
.touch .ob-main{padding:22px 18px 14px}
.touch .ob-main h1{font-size:22px}
.touch .ob-list{max-height:none}
.touch .ob-li{padding:12px 14px}
.touch .ob-priv{grid-template-columns:1fr}
.touch .ob-foot button{min-height:40px;font-size:15px}
.touch .ob-main input{min-height:38px;font-size:16px}
.touch .ob-tray{display:none}
.touch .eg-favs{display:flex;overflow-x:auto;scrollbar-width:none;padding:2px 6px 6px;gap:6px}.touch .eg-favs::-webkit-scrollbar{display:none}.touch .eg-fav{flex:none;padding:6px 8px;white-space:nowrap}
.touch .pt-toasts{top:auto;bottom:10px}.touch .pt-toast .tt{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* task-complete toast replaces the pinned task strip for a moment instead of covering the app */
.touch .lb-toasts{top:calc(44px + env(safe-area-inset-top));bottom:auto;left:0;transform:none;width:100%;gap:0}
.touch .lb-toast{border-radius:0;border:none;padding:0 12px;height:36px;box-shadow:none;font-size:13px;background:#053b35}
.touch .lb-toast+.lb-toast{display:none}
.touch .lb-toast span{width:22px;height:22px;font-size:12px}
.touch .lb-toast>div{display:flex;gap:6px;min-width:0;white-space:nowrap}
.touch .lb-toast>div>div{overflow:hidden;text-overflow:ellipsis}

/* ---- Print Management, Group Policy Management, Network Connections ---- */
.touch .mmc-detail{padding:12px;font-size:14px}
.touch .gpd-tabs,.touch .nc-bar,.touch .exp-bar{display:none}
.touch .gpd h4{font-size:14px;margin-top:16px}
.touch .mmc-detail table.gpd-t,.touch .gpd-t tbody{display:table;width:100%}
.touch .gpd-t thead{display:table-header-group}
.touch .gpd-t tr{display:table-row;padding:0;min-height:0;border:none}
.touch .gpd-t td,.touch .gpd-t th{display:table-cell;padding:6px!important;font-size:12.5px!important;color:inherit!important;white-space:normal;border-bottom:1px solid #eceef1}
.touch .dlg-list .row{height:auto;min-height:40px;white-space:normal;padding:6px 8px;font-size:14px}
.touch .dlg-list .row a{padding:8px 4px}
.touch .gpe-node{padding:10px 8px;font-size:13px}
.touch .wselect{min-height:36px;font-size:16px;max-width:100%}
.touch .nc-item{width:100%;padding:12px;font-size:14px;border-bottom:1px solid #eceef1}
.touch .nc-d{font-size:12px}
.touch .wtab{padding:8px 12px}
.touch .wtabpane{min-height:200px}
.touch .wgroup>.wgl{position:static;display:block;background:none;padding:0 0 6px;font-weight:600}
