:root{font-family:Inter,"Microsoft YaHei",sans-serif;color:#172033;background:#f5f7fb}*{box-sizing:border-box}body{margin:0}.hidden{display:none!important}.topbar{height:76px;background:#fff;border-bottom:1px solid #e8edf5;display:flex;align-items:center;justify-content:space-between;padding:0 28px}.topbar h1{font-size:22px;margin:0 0 4px}.brand{font-size:27px;font-weight:700}.muted{color:#718096;font-size:13px}.auth-shell{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#e9f2ff,#f5f7fb)}.auth-card{width:min(420px,calc(100% - 32px));padding:34px;background:#fff;border-radius:18px;box-shadow:0 16px 45px #29476b1c}.auth-card label,.form-row label{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#556070;margin:15px 0}.auth-card input,.form-row input,.connect-panel input,.input-row input,.overlay-panel textarea,.template-row select{border:1px solid #d8e0ec;border-radius:9px;padding:12px 13px;font:inherit;outline:none;background:#fff}.auth-card input:focus,.connect-panel input:focus,.input-row input:focus,.overlay-panel textarea:focus{border-color:#2f80ed}.primary,.toolbar button,.quick-actions button,.input-row button,#applyTemplate,#editTemplate{border:0;border-radius:9px;padding:12px 18px;cursor:pointer;background:#e7eefb;color:#2b5fa9;font-weight:600}.primary{background:#2f80ed;color:#fff;width:100%}.check{display:block;margin:10px 0;color:#556070;font-size:13px}.ghost{background:none;border:1px solid #d8e0ec;border-radius:9px;padding:10px 15px;cursor:pointer}.dashboard{max-width:1100px;margin:30px auto;padding:0 22px;display:grid;grid-template-columns:1fr 1.4fr;gap:20px}.panel{background:#fff;border-radius:16px;padding:20px;box-shadow:0 7px 25px #29476b0d;border:1px solid #edf1f7}.panel h2,.panel h3{margin:0 0 16px;font-size:17px}.connect-panel{display:flex;flex-direction:column;gap:12px}.connect-panel .primary{width:auto}.error{color:#c53030;min-height:18px;font-size:13px}.log{height:180px;overflow:auto;background:#121a26;color:#d8e9ff;border-radius:10px;padding:14px;font-size:12px;white-space:pre-wrap}.form-row{display:flex;gap:12px;align-items:end}.form-row label{flex:1;margin:0}.form-row button{height:43px;white-space:nowrap}.control-layout{max-width:1600px;margin:22px auto;padding:0 22px;display:grid;grid-template-columns:1fr 1.15fr;gap:20px;align-items:start}.pane-title{display:flex;justify-content:space-between;align-items:center}.status{font-size:12px;color:#1b71d1;background:#e9f3ff;border-radius:99px;padding:6px 10px}.skeleton-canvas{min-height:550px;border:1px dashed #b7c7df;border-radius:12px;position:relative;background:linear-gradient(90deg,#f7fbff,#fff);overflow:auto}.empty{position:absolute;inset:0;display:grid;place-items:center;color:#8b9ab0;font-size:13px}.node-box{position:absolute;border:2px solid #2f80ed;border-radius:5px;color:#164a8e;font-size:11px;padding:2px 4px;background:#dbeaffaa;cursor:pointer;min-width:28px;min-height:20px}.node-box.only-visual{border-color:#d69e2e;color:#975a16;background:#fff8df}.input-row{display:flex;gap:8px;margin-top:12px}.input-row input{flex:1}.quick-actions{display:flex;gap:8px;margin-top:12px}.quick-actions button{flex:1}.screen-wrap{height:650px;max-width:420px;margin:0 auto;background:#0d1522;border-radius:14px;position:relative;display:grid;place-items:center;overflow:hidden;cursor:crosshair}.screen-wrap video{height:100%;width:100%;object-fit:contain}.screen-wrap video:not([src]){display:none}.screen-wrap #videoPlaceholder{color:#91a5bf;font-size:13px;text-align:center;padding:20px}.overlay-panel{border-top:1px solid #e7edf5;margin-top:18px;padding-top:18px}.template-row{display:flex;gap:8px}.template-row select{flex:1}.overlay-panel textarea{width:100%;resize:vertical;margin:10px 0}.overlay-panel .form-row{margin-bottom:12px}.overlay-panel #applyTemplate{background:#2f80ed;color:#fff;width:100%}@media(max-width:1000px){.dashboard,.control-layout{grid-template-columns:1fr}.screen-wrap{height:560px}}

.panel-heading,.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-heading h2,.section-heading h3{margin-bottom:0}.status-pill{padding:5px 10px;border-radius:999px;background:#edf5ff;color:#2f80ed;font-size:12px}.recent-devices{margin-top:8px;border-top:1px solid #edf1f7;padding-top:18px}.section-heading h3{font-size:14px}.device-history{display:flex;flex-direction:column;gap:8px;margin-top:12px}.history-empty{padding:20px 8px;text-align:center;color:#9aa8bb;font-size:13px;border:1px dashed #dfe7f1;border-radius:10px}.device-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #e3eaf3;border-radius:10px;background:#fbfdff}.device-code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#243b61;font-weight:600;letter-spacing:.3px}.history-connect{border:0;border-radius:7px;background:#eaf2ff;color:#2f72c8;padding:6px 12px;cursor:pointer}.build-panel{min-width:0}.version-row{margin-bottom:4px}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:12px}.field-grid>label{display:flex;flex-direction:column;gap:7px;color:#556070;font-size:13px}.field-grid input{width:100%;border:1px solid #d8e0ec;border-radius:9px;padding:11px 12px;font:inherit;outline:none;background:#fff}.field-grid input:focus{border-color:#2f80ed}.field-with-action{display:flex;gap:7px;min-width:0}.field-with-action input{min-width:0;flex:1}.refresh-button{width:43px;flex:none;border:1px solid #c9daf2;border-radius:9px;background:#f0f6ff;color:#2f80ed;font-size:22px;line-height:1;cursor:pointer}.network-grid{margin-top:14px}.icon-upload-row{display:flex;align-items:center;gap:10px;min-height:44px}.icon-preview{width:44px;height:44px;flex:none;border-radius:11px;background:linear-gradient(135deg,#2f80ed,#6aa8ff);background-size:cover;background-position:center;display:grid;place-items:center;color:#fff;font-size:19px;font-weight:700;overflow:hidden}.icon-upload-row input[type=file]{min-width:0;padding:8px}.build-panel .log{margin:16px 0 12px}.build-panel>#downloadApk{width:100%}@media(max-width:760px){.field-grid{grid-template-columns:1fr}.dashboard{margin-top:18px;padding:0 14px}.topbar{padding:0 16px}}
.device-actions{display:flex;align-items:center;gap:10px}.device-status{min-width:42px;text-align:center;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:600}.status-online{background:#e6f8ee;color:#198754}.status-offline{background:#f1f3f5;color:#8b96a3}.status-unknown{background:#fff5db;color:#a26b00}

/* Control page v2: centered dual-screen workspace */
.control-body{min-height:100vh;background:linear-gradient(180deg,#f5f8fc 0%,#eef3f9 100%)}
.control-topbar{position:sticky;top:0;z-index:5;padding:0 32px;box-shadow:0 4px 16px #29476b0d}
.control-page{width:min(1240px,calc(100% - 40px));margin:28px auto 44px;display:flex;flex-direction:column;gap:16px}
.control-screens{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.reader-pane,.screen-pane{padding:18px;background:#fff;border:1px solid #e4ebf4;border-radius:18px;box-shadow:0 12px 32px #29476b12}
.pane-title{min-height:46px}.pane-title h2{margin:0;font-size:18px;color:#172033}.pane-subtitle{margin:5px 0 0;color:#8190a5;font-size:12px}.compact-title{min-height:0}
.portrait-surface{width:min(100%,390px);aspect-ratio:9 / 16;height:auto;min-height:0;margin:16px auto 0;border-radius:16px;overflow:hidden}
.skeleton-canvas{border:1px dashed #aec1dd;position:relative;background:linear-gradient(180deg,#f8fbff,#eef5fd);overflow:hidden}
.skeleton-canvas .empty{padding:28px;text-align:center;line-height:1.7}.screen-wrap{background:#0b1422;cursor:crosshair}.screen-wrap video{display:block;width:100%;height:100%;object-fit:contain}.screen-wrap #videoPlaceholder{max-width:220px;line-height:1.7}.system-actions,.control-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.system-actions{padding:2px 0}.system-actions button{min-width:92px;border:1px solid #cfdbea;border-radius:9px;padding:10px 20px;background:#fff;color:#30435f;font-weight:600;cursor:pointer}.system-actions button:hover{border-color:#2f80ed;color:#2f80ed;background:#f5f9ff}.control-actions{padding:14px 16px;border:1px solid #e0e8f2;background:#fff;border-radius:14px;box-shadow:0 6px 20px #29476b0b}.control-actions button{border:1px solid #cfdbea;border-radius:9px;padding:11px 18px;background:#f6f9fd;color:#31557f;font-weight:600;cursor:pointer}.control-actions button:hover{border-color:#2f80ed;color:#2f80ed;background:#eef6ff}.control-actions .primary{border-color:#2f80ed;background:#2f80ed;color:#fff}.browser-open-row{display:flex;align-items:center;gap:22px;padding:16px 18px}.browser-open-label{display:flex;flex-direction:column;gap:5px;min-width:190px}.browser-open-label strong{color:#172033}.browser-open-label span{font-size:12px;color:#8190a5}.browser-open-form{display:flex;flex:1;gap:10px}.browser-open-form input{flex:1;min-width:0;border:1px solid #d8e0ec;border-radius:9px;padding:12px 13px;font:inherit;outline:none}.browser-open-form input:focus{border-color:#2f80ed}.browser-open-form .primary{width:92px;border:0;border-radius:9px;padding:12px 18px;cursor:pointer;background:#2f80ed;color:#fff;font-weight:600}.utility-panel{padding:18px}.utility-grid{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:24px}.utility-grid>.overlay-panel{border-top:0;border-left:1px solid #e7edf5;margin:0;padding:0 0 0 24px}.utility-grid .input-row{margin-top:14px}.utility-grid .input-row input{min-width:0}.utility-grid .template-row{margin-bottom:8px}.utility-grid .template-row input[type=file]{flex:1;min-width:0}.utility-grid .template-row button{white-space:nowrap}.utility-grid .overlay-panel textarea{margin-top:4px}.utility-grid #applyTemplate{margin-top:4px}
@media(max-width:900px){.control-page{width:min(100% - 24px,680px);margin-top:16px}.control-screens{grid-template-columns:1fr}.browser-open-row{align-items:stretch;flex-direction:column;gap:12px}.utility-grid{grid-template-columns:1fr}.utility-grid>.overlay-panel{border-left:0;border-top:1px solid #e7edf5;padding:18px 0 0;margin-top:8px}}
@media(max-width:520px){.control-topbar{padding:0 16px}.control-topbar h1{font-size:19px}.control-page{width:calc(100% - 20px)}.control-actions{justify-content:stretch}.control-actions button{flex:1;min-width:0;padding:10px 8px;font-size:12px}.system-actions button{flex:1;min-width:0}.browser-open-form{flex-direction:column}.browser-open-form .primary{width:100%}.template-row{flex-wrap:wrap}.template-row>*{min-width:0;flex:1}.template-row input[type=file]{width:100%;flex-basis:100%}}
.control-actions .primary{width:auto}
.overlay-position-row{align-items:stretch;gap:14px}.overlay-position-row label{display:flex;flex:1;flex-direction:column;gap:6px;color:#556070;font-size:13px}.overlay-position-row output{align-self:flex-end;color:#2f80ed;font-size:12px;font-variant-numeric:tabular-nums}.overlay-position-row input[type=range]{width:100%;padding:0;border:0;background:transparent;accent-color:#2f80ed}
.screen-wrap video:not([src]){display:block}
.reader-pane .skeleton-canvas{background:#202b38;border:1px solid #3b4c60;box-shadow:0 12px 24px #10182735}.reader-pane .skeleton-canvas .empty{color:#8190a5}.reader-pane .reader-layer .node-box{background:transparent;color:#fff;border-color:#fff}.reader-pane .reader-layer .node-box.node-label{border-color:#fff;color:#fff}.reader-pane .reader-layer .node-box.node-disabled{border-color:#7c8799;color:#aebed1}.reader-pane .reader-layer .node-box.only-visual{border-color:#f6ad55;color:#f6ad55}.reader-pane .reader-layer .ocr-overlay-box{background:transparent;border-color:#c084fc;color:#e9d8fd}.reader-pane .reader-status-row{color:#aebed1}
.screen-text-input{width:min(100%,390px);margin:14px auto 0}.screen-text-input input{min-width:0}.screen-text-input button{white-space:nowrap}
.reader-status-row{width:min(100%,390px);margin:12px auto 0;display:flex;gap:8px 16px;flex-wrap:wrap;font-size:12px;color:#66758a}.control-actions{row-gap:8px}
.utility-panel>.overlay-panel{border-top:0;margin-top:0;padding-top:0}.utility-panel .overlay-panel textarea{margin-top:0}
.screen-system-actions{width:min(100%,390px);margin:12px auto 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.screen-system-actions button{min-width:0;padding:10px 8px}
.reader-pane .pane-title,.screen-pane .pane-title{gap:8px;align-items:flex-start;flex-wrap:wrap}.reader-pane .status{max-width:100%;white-space:normal;overflow-wrap:anywhere}.reader-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none}.skeleton-canvas{cursor:crosshair;touch-action:none}.skeleton-canvas .empty{pointer-events:none}.reader-layer .node-box,.reader-layer .ocr-overlay-box{position:absolute;min-width:0;min-height:0;margin:0;border-radius:3px;font-family:inherit;font-size:11px;line-height:1.3;padding:1px 2px;overflow:hidden;overflow-wrap:anywhere;white-space:normal;text-align:left;pointer-events:auto;cursor:crosshair;background:#dbeaff44}.reader-layer .node-box.only-visual{border:1px dashed #d69e2e;background:transparent;color:#975a16;pointer-events:none}.reader-layer .node-box.node-label{border:1px solid #a9bbd4;background:transparent}.reader-layer .node-box.node-disabled{border-color:#a0a8b5;color:#7c8799;background:transparent}.reader-layer .ocr-overlay-box{border:1px solid #805ad5;background:#e9d8fd44;color:#553c9a}.reader-combined-mode .skeleton-canvas{border-color:#805ad5}.screen-wrap{touch-action:none}

/* Account management is isolated from the remote-screen layout. */
.account-header-actions{display:flex;align-items:center;gap:12px;min-width:0}
.account-header-actions .muted{overflow-wrap:anywhere;max-width:160px}
.operator-home .dashboard{grid-template-columns:minmax(0,500px);justify-content:center}
#historyMessage{margin:0;line-height:1.5}#historyMessage:empty{display:none}
.accounts-dialog{width:min(1380px,calc(100% - 32px));max-height:calc(100dvh - 48px);padding:0;border:1px solid #dce3ec;border-radius:8px;background:#fff;color:#243041;box-shadow:0 18px 65px #23334726;overflow:auto}
.accounts-dialog::backdrop{background:#24304133}
.accounts-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e7ebf1}
.accounts-heading{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.accounts-heading h2{margin:0;font-size:22px;line-height:1.4}
.account-close{width:36px;height:36px;flex:none;border:0;background:transparent;color:#718096;cursor:pointer;font-size:27px;border-radius:6px}
.accounts-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;min-height:530px}
.accounts-list{padding:22px 24px;min-width:0}.accounts-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.accounts-filters input,.accounts-filters select,.account-editor input:not([type=checkbox]),.account-editor textarea{font:inherit;border:1px solid #dce3ec;border-radius:6px;padding:10px 12px;background:#fff;color:#243041;min-width:0}
.accounts-filters input{flex:1;max-width:280px;width:100%}.accounts-filters select{max-width:100%}.accounts-filters .ghost{margin-left:auto;border-radius:6px}
.accounts-message{font-size:13px;min-height:20px;line-height:1.5;margin:12px 0;color:#315b87;overflow-wrap:anywhere}
.accounts-table-wrap{overflow-x:auto}.accounts-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left;table-layout:fixed}
.accounts-table th{background:#f7f9fc;color:#718096;font-weight:400;padding:12px 8px}
.accounts-table td{padding:15px 8px;border-bottom:1px solid #e7ebf1;vertical-align:top;overflow-wrap:anywhere;line-height:1.6}
.accounts-table th:nth-child(1){width:17%}.accounts-table th:nth-child(2){width:12%}.accounts-table th:nth-child(3){width:10%}.accounts-table th:nth-child(4){width:22%}.accounts-table th:nth-child(5){width:20%}.accounts-table th:nth-child(6){width:19%}
.account-name{font-weight:600}.account-ip{white-space:pre-line}.account-state{display:inline-block;padding:3px 8px;border-radius:4px;white-space:nowrap;font-size:12px}
.account-state.enabled{background:#edf8f2;color:#24885a}.account-state.disabled{background:#eff1f4;color:#7c8797}
.account-row-actions{display:flex;flex-wrap:wrap;gap:8px 12px}.account-row-action{padding:0;min-height:25px;border:0;background:transparent;color:#2f80ed;cursor:pointer;font:inherit;white-space:nowrap}.account-row-action.destructive{color:#c53030}
.accounts-table .account-empty{text-align:center;color:#8793a3;padding:40px 12px}
.account-editor{padding:22px 24px;border-left:1px solid #e7ebf1;min-width:0;display:flex;flex-direction:column;gap:16px}
.account-editor h3{margin:0 0 4px;font-size:18px}.account-editor label{display:flex;flex-direction:column;gap:7px;color:#59677a;font-size:13px}
.account-editor textarea{resize:vertical;min-height:88px}.account-editor input[readonly]{background:#f7f9fc;color:#7c8797}
.account-editor .account-toggle-row{flex-direction:row;align-items:center;justify-content:space-between}
.account-toggle-row input{appearance:none;position:relative;width:42px;height:24px;flex:none;margin:0;border-radius:12px;background:#cbd4df;cursor:pointer}
.account-toggle-row input:checked{background:#2f80ed}.account-toggle-row input::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff}.account-toggle-row input:checked::after{left:21px}
.account-editor .error{margin:0;line-height:1.5;overflow-wrap:anywhere}.account-form-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #e7ebf1;padding-top:18px;margin-top:auto}
.account-form-actions .primary{width:auto;border-radius:6px}.account-form-actions .ghost{border-radius:6px}
.accounts-dialog button:disabled,#clearHistory:disabled{opacity:.5;cursor:wait}
.accounts-dialog :focus-visible,.account-header-actions button:focus-visible,#clearHistory:focus-visible{outline:2px solid #2f80ed;outline-offset:2px}
#operatorTemplateRow select{width:100%;padding:10px 12px;border:1px solid #dce3ec;border-radius:6px;font:inherit;background:#fff}
@media(max-width:1100px){.accounts-layout{grid-template-columns:minmax(0,1fr) 300px}.accounts-table{min-width:690px}}
@media(max-width:800px){.accounts-layout{grid-template-columns:1fr;min-height:0}.account-editor{border-left:0;border-top:1px solid #e7ebf1}.accounts-list,.account-editor{padding:18px}.accounts-dialog-header{padding:16px 18px}.account-header-actions{gap:8px}.account-header-actions .muted{max-width:90px}}
@media(max-width:520px){#homeView>.topbar{height:auto;min-height:76px;gap:12px;flex-wrap:wrap;padding:14px 16px}.account-header-actions{width:100%;flex-wrap:wrap}.account-header-actions .muted{max-width:100px;margin-right:auto}.accounts-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 24px)}.accounts-heading{gap:8px}.accounts-heading h2{font-size:19px}.accounts-filters input{flex-basis:100%;max-width:none}.account-editor input:not([type=checkbox]),.account-editor textarea,.accounts-filters input,.accounts-filters select{font-size:16px}.accounts-table{min-width:660px}.account-row-action{min-height:32px}}
.build-workbench{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);gap:18px;margin-top:16px}.build-config-card,.build-history-card,.build-log-card,.build-target-card{border:1px solid #e3eaf3;border-radius:12px;background:#fbfdff;padding:16px}.build-config-card h3,.build-card-heading h3{margin:0;font-size:15px;color:#25344b}.build-subtitle{border-top:1px solid #e7edf5;padding-top:17px;margin-top:18px!important}.build-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:14px}.build-field-grid label,.build-rule-grid label{display:flex;flex-direction:column;gap:7px;color:#556070;font-size:13px}.build-field-grid input,.build-rule-grid input{width:100%;border:1px solid #d8e0ec;border-radius:8px;padding:10px 11px;font:inherit;outline:none;background:#fff}.build-field-grid input:focus,.build-rule-grid input:focus{border-color:#2f80ed}.build-field-grid .field-with-action{display:flex}.build-icon-field{grid-column:1 / -1}.build-rule-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px;margin-top:14px}.build-action-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:18px}.build-action-row .primary,.build-action-row .ghost{width:auto;padding:10px 16px}.sign-mode{display:flex;margin-left:auto;border:1px solid #c9daf2;border-radius:8px;overflow:hidden}.sign-mode-button{border:0;background:#fff;color:#55708f;padding:9px 12px;cursor:pointer}.sign-mode-button+button{border-left:1px solid #c9daf2}.sign-mode-button.active{background:#eaf3ff;color:#2f80ed;font-weight:600}.build-message{min-height:18px;margin:12px 0 0;color:#315b87;font-size:13px}.build-side-column{display:flex;flex-direction:column;gap:14px;min-width:0}.build-card-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.refresh-link{border:0;background:none;color:#2f80ed;cursor:pointer;padding:3px}.build-history-list,.build-target-list{display:flex;flex-direction:column;gap:8px;margin-top:12px}.build-history-row,.build-target-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #e3eaf3;border-radius:9px;background:#fff;padding:10px 11px}.build-history-title,.build-target-info{display:flex;flex-direction:column;gap:4px;min-width:0}.build-history-title,.build-target-info strong{font-size:13px;color:#30435f;overflow-wrap:anywhere}.build-history-meta,.build-target-info span{font-size:11px;color:#8793a3}.build-history-row a{white-space:nowrap;color:#2f80ed;font-size:12px}.build-target-actions{display:flex;align-items:center;gap:10px;white-space:nowrap}.target-build-button{width:auto;padding:8px 11px;font-size:12px}.text-action{border:0;background:none;color:#2f80ed;cursor:pointer;padding:5px}.text-action.destructive{color:#c53030}.build-log-card .log{height:150px;margin:12px 0 0}.build-history-card,.build-log-card,.build-target-card{min-width:0}@media(max-width:900px){.build-workbench{grid-template-columns:1fr}.build-side-column{display:grid;grid-template-columns:1fr 1fr}.build-target-card{grid-column:1 / -1}}@media(max-width:620px){.build-field-grid,.build-rule-grid{grid-template-columns:1fr}.build-icon-field{grid-column:auto}.build-action-row{align-items:stretch}.sign-mode{margin-left:0;width:100%}.sign-mode-button{flex:1}.build-side-column{display:flex}.build-history-row,.build-target-row{align-items:flex-start;flex-direction:column}.build-target-actions{width:100%;justify-content:flex-end}}

/* Home layout: keep device connection and APK build as separate full-width views. */
.home-tabs{height:66px;background:#f5f7fb;border-bottom:1px solid #dce5f0;display:flex;align-items:end;gap:12px;padding:0 30px}
.home-tab{border:0;border-bottom:3px solid transparent;background:transparent;color:#718096;padding:0 4px 16px;font:inherit;font-size:15px;cursor:pointer}
.home-tab.active{color:#2f80ed;border-bottom-color:#2f80ed;font-weight:600}
.home-content{width:min(100%,1480px);margin:0 auto;padding:30px 26px 46px}
.home-panel{width:100%}.home-panel[hidden]{display:none}
.device-panel{max-width:640px;margin:0 auto}.device-panel .panel{width:100%}
#buildPanel.build-panel{width:100%;max-width:none;margin:0;padding:24px;background:#fff}
#buildPanel .build-workbench{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px;margin-top:20px}
#buildPanel .build-config-card{min-width:0;padding:0 36px 0 0;border:0;border-right:1px solid #dce5f0;border-radius:0;background:transparent}
#buildPanel .build-side-column{gap:25px}
#buildPanel .build-side-column>section{border-bottom:1px solid #dce5f0;padding-bottom:24px}
#buildPanel .build-side-column>section:last-child{border-bottom:0;padding-bottom:0}
#buildPanel .build-history-body{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
#buildPanel .build-history-title{display:block;font-size:14px;font-weight:600;color:#30435f}
#buildPanel .build-history-url{font-size:12px;color:#718096;overflow-wrap:anywhere}
#buildPanel .build-history-actions{display:flex;align-items:center;gap:10px;white-space:nowrap}
#buildPanel .history-link{border:1px solid #d6e1ef;border-radius:8px;background:#fff;color:#2c5e9b;padding:8px 12px;white-space:nowrap;font-size:12px}
#buildPanel .build-history-row .text-action.destructive{border:1px solid #efcaca;border-radius:8px;padding:8px 12px}
#buildPanel .build-history-row button:disabled{opacity:.5;cursor:wait}
.build-history-heading-actions{display:flex;align-items:center;gap:10px}.build-history-clear{color:#c53030}.build-history-clear:hover{color:#9b2c2c}
@media(max-width:1000px){.home-content{padding:22px 18px 36px}#buildPanel .build-workbench{grid-template-columns:1fr}#buildPanel .build-config-card{padding:0 0 26px;border-right:0;border-bottom:1px solid #dce5f0}}
@media(max-width:620px){.home-tabs{padding:0 18px}.home-content{padding:16px 12px 28px}#buildPanel.build-panel{padding:16px}.home-tab{font-size:14px}.build-history-actions{width:100%;justify-content:flex-end}.build-history-row{align-items:flex-start}}

/* Screenshot flow shares the same portrait surface as the WebRTC video flow. */
.screen-wrap video,.screen-wrap img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.screen-wrap img{user-select:none;-webkit-user-drag:none}.screen-wrap #videoPlaceholder{z-index:1}
