/* Preview Workbench — zero-invasion overlay around Creator preview */ /* 双文档:游戏页隐藏壳;壳页用 iframe 承载游戏 */ html[data-pw='game'] .pw-shell-only { display: none !important; } html[data-pw='game'] #pw-root { height: 100vh; } html[data-pw='game'] #pw-game-host, html[data-pw='game'] .pw-game-host { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; } html[data-pw='shell'] body > .toolbar, html[data-pw='shell'] body > #toolbar { display: none !important; } .pw-game-iframe-host { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; overflow: hidden; background: #000; } .pw-game-iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; } /* 壳页引擎哑元:满足 #GameCanvas/#splash 等查询,不参与显示与交互 */ .pw-shell-engine-stub { position: fixed !important; left: -10000px !important; top: -10000px !important; width: 2px !important; height: 2px !important; overflow: hidden !important; opacity: 0 !important; pointer-events: none !important; z-index: -1 !important; } html[data-pw='shell'] .pw-shell-dummy-canvas, .pw-shell-dummy-canvas { width: 1px !important; height: 1px !important; pointer-events: none !important; } /* 游戏宿主固定 overlay:永不插入停靠树,避免 iframe 重载 */ .pw-game-host.pw-game-overlay { position: absolute !important; z-index: 10; margin: 0 !important; box-sizing: border-box; pointer-events: auto !important; } .pw-game-host.pw-game-overlay .pw-game-iframe { pointer-events: auto !important; } .pw-game-placeholder { width: 100%; height: 100%; min-width: 0; min-height: 0; background: #0a0a0a; pointer-events: none; } /* 关闭工作台:保留设备选项,隐藏调试面板与其它工具 */ .pw-root.pw-workbench-off .pw-toolbar-left, .pw-root.pw-workbench-off #pw-compact-bar, .pw-root.pw-workbench-off #pw-drawer, .pw-root.pw-workbench-off #pw-drop-overlay, .pw-root.pw-workbench-off #pw-float-layer { display: none !important; } .pw-root.pw-workbench-off .pw-toolbar-center > :not(#pw-device-select):not(#pw-device-rotate):not(#pw-game-refresh) { display: none !important; } .pw-root.pw-workbench-off .pw-toolbar { position: relative; justify-content: center; } .pw-root.pw-workbench-off .pw-toolbar-center { flex: 0 0 auto; justify-content: center; } .pw-root.pw-workbench-off .pw-toolbar-right { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); flex: 0 0 auto; margin: 0; } .pw-root.pw-workbench-off #pw-workspace { background: #000; flex: 1; min-height: 0; } .pw-root.pw-workbench-off #pw-engine-status { display: none; } #pw-workbench-toggle { flex-shrink: 0; order: 99; } #pw-workbench-toggle.active { background: var(--pw-accent); color: #fff; border-color: var(--pw-accent); } .pw-toolbar-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; } #pw-pure-measure.active { background: var(--pw-accent); color: #fff; border-color: var(--pw-accent); } /* 隐藏官方预览工具栏(仍保留 DOM 以免破坏预览注入) */ .pw-official-toolbar-hidden, body > .toolbar, body > #toolbar { display: none !important; height: 0 !important; overflow: hidden !important; margin: 0 !important; padding: 0 !important; border: none !important; } body { display: flex; flex-direction: column; height: 100vh; margin: 0; } .pw-check { display: inline-flex; align-items: center; gap: 4px; color: var(--pw-text, #ccc); user-select: none; } .pw-check input { margin: 0; } .pw-root { --pw-bg: #1e1e1e; --pw-panel: #252526; --pw-border: #3c3c3c; --pw-text: #cccccc; --pw-muted: #858585; --pw-accent: #3794ff; --pw-danger: #f14c4c; --pw-toolbar-h: 36px; --pw-left-w: 240px; --pw-right-w: 280px; --pw-bottom-h: 220px; position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; height: auto; color: var(--pw-text); font: 12px/1.4 Consolas, "Courier New", monospace; background: var(--pw-bg); box-sizing: border-box; } .pw-root *, .pw-root *::before, .pw-root *::after { box-sizing: border-box; } .pw-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: var(--pw-toolbar-h); height: auto; padding: 4px 10px; background: #2d2d2d; border-bottom: 1px solid var(--pw-border); flex-shrink: 0; z-index: 20; } .pw-toolbar-left, .pw-toolbar-center, .pw-toolbar-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; } .pw-toolbar-left { flex: 1 1 0; justify-content: flex-start; } .pw-toolbar-center { flex: 0 1 auto; justify-content: center; } .pw-toolbar-right { flex: 1 1 0; justify-content: flex-end; } .pw-brand { font-weight: 700; color: #fff; margin-right: 4px; } .pw-status { color: var(--pw-muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pw-status.ok { color: #89d185; } .pw-status.err { color: var(--pw-danger); } /* 滑动开关(FPS 浮窗) */ .pw-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; color: var(--pw-text); height: 22px; } .pw-switch input { position: absolute; opacity: 0; width: 0; height: 0; } .pw-switch-track { position: relative; width: 34px; height: 18px; border-radius: 999px; background: #555; border: 1px solid #666; transition: background 0.15s ease, border-color 0.15s ease; flex-shrink: 0; } .pw-switch-thumb { position: absolute; top: 1px; left: 1px; width: 14px; height: 14px; border-radius: 50%; background: #ddd; transition: transform 0.15s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); } .pw-switch input:checked + .pw-switch-track { background: var(--pw-accent); border-color: var(--pw-accent); } .pw-switch input:checked + .pw-switch-track .pw-switch-thumb { transform: translateX(16px); background: #fff; } .pw-switch-text { font-size: 11px; color: var(--pw-muted); } .pw-switch input:checked ~ .pw-switch-text { color: #fff; } /* 全局暗色细滚动条 */ .pw-root, .pw-root * { scrollbar-width: thin; scrollbar-color: #5a5a5a #1a1a1a; } .pw-root *::-webkit-scrollbar { width: 8px; height: 8px; } .pw-root *::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 4px; } .pw-root *::-webkit-scrollbar-thumb { background: #4c4c4c; border-radius: 4px; border: 2px solid #1a1a1a; background-clip: padding-box; } .pw-root *::-webkit-scrollbar-thumb:hover { background: #6a6a6a; border: 2px solid #1a1a1a; background-clip: padding-box; } .pw-root *::-webkit-scrollbar-corner { background: #1a1a1a; } .pw-btn { appearance: none; border: 1px solid var(--pw-border); background: #333; color: var(--pw-text); padding: 2px 8px; border-radius: 3px; cursor: pointer; font: inherit; } .pw-btn:hover { border-color: var(--pw-accent); } .pw-btn.active { background: var(--pw-accent); border-color: var(--pw-accent); color: #fff; } .pw-select { background: #333; color: var(--pw-text); border: 1px solid var(--pw-border); border-radius: 3px; padding: 2px 4px; font: inherit; } .pw-mode-toggle { display: inline-flex; gap: 0; } .pw-mode-toggle .pw-btn { border-radius: 0; } .pw-mode-toggle .pw-btn:first-child { border-radius: 3px 0 0 3px; } .pw-mode-toggle .pw-btn:last-child { border-radius: 0 3px 3px 0; } .pw-main { display: flex; flex: 1; min-height: 0; min-width: 0; } .pw-center { position: relative; flex: 1; min-width: 120px; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; } /* 尺寸一律由 device.js 按设备逻辑分辨率写入,禁止此处再用 auto/max 覆盖 */ .pw-dock { background: var(--pw-panel); border-color: var(--pw-border); min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; } .pw-dock-left { width: var(--pw-left-w); border-right: 1px solid var(--pw-border); flex-shrink: 0; } .pw-dock-right { width: var(--pw-right-w); border-left: 1px solid var(--pw-border); flex-shrink: 0; } .pw-dock-bottom { height: var(--pw-bottom-h); border-top: 1px solid var(--pw-border); flex-shrink: 0; } .pw-dock.collapsed, .pw-dock[hidden] { display: none !important; } .pw-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; } .pw-panel[hidden] { display: none !important; } .pw-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 8px; background: #2d2d2d; border-bottom: 1px solid var(--pw-border); flex-shrink: 0; } .pw-panel-title { font-weight: 600; color: #fff; } .pw-panel-body { flex: 1; min-height: 0; overflow: auto; padding: 6px 8px; } .pw-panel-tools { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .pw-input { background: #1a1a1a; border: 1px solid var(--pw-border); color: var(--pw-text); border-radius: 3px; padding: 2px 6px; font: inherit; min-width: 0; } .pw-input:focus { outline: none; border-color: var(--pw-accent); } .pw-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; } .pw-row label { color: var(--pw-muted); min-width: 64px; } .pw-hier-tree { overflow: auto; } .pw-tree-item { display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 1px 6px 1px 0; white-space: nowrap; user-select: none; height: 22px; line-height: 22px; } .pw-tree-item:hover { background: #2a2d2e; } .pw-tree-item.selected { background: #094771; } .pw-tree-item.inactive { opacity: 0.45; } .pw-tree-twist { width: 14px; height: 14px; flex-shrink: 0; border: none; background: transparent; color: #ccc; padding: 0; cursor: pointer; font-size: 10px; line-height: 14px; text-align: center; } .pw-tree-twist.empty { visibility: hidden; } .pw-tree-icon { width: 14px; height: 14px; flex-shrink: 0; display: inline-block; background-size: contain; background-repeat: no-repeat; background-position: center; } .pw-tree-icon.scene { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23f0a020' d='M8 1c1.5 3 2 5 2 7a2 2 0 11-4 0c0-2 .5-4 2-7zm-3 9c0 2 1.5 4 3 5 1.5-1 3-3 3-5-.8.6-1.8 1-3 1s-2.2-.4-3-1z'/%3E%3C/svg%3E"); } .pw-tree-icon.camera { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='4' width='10' height='8' rx='1' fill='%23f0a020'/%3E%3Cpath fill='%23f0a020' d='M11 7l4-2v6l-4-2z'/%3E%3C/svg%3E"); } .pw-tree-icon.canvas { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='1' width='14' height='14' rx='1' fill='none' stroke='%236fcf97' stroke-width='1.5'/%3E%3Cpath stroke='%236fcf97' d='M1 5h14M5 1v14'/%3E%3C/svg%3E"); } .pw-tree-icon.script { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ddd' d='M3 2h6l4 4v8H3V2zm6 0v4h4'/%3E%3C/svg%3E"); } .pw-tree-icon.sprite { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='3' width='14' height='10' rx='1' fill='%23c586c0'/%3E%3Ccircle cx='5' cy='7' r='1.5' fill='%23222'/%3E%3Cpath fill='%23222' d='M1 11l4-3 3 2 4-4 3 3v2H1z'/%3E%3C/svg%3E"); } .pw-tree-icon.label { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ctext x='3' y='13' font-size='12' font-family='Arial' fill='%23c586c0' font-weight='700'%3ET%3C/text%3E%3C/svg%3E"); } .pw-tree-icon.ui { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='2' width='12' height='12' rx='1' fill='none' stroke='%236fcf97' stroke-width='1.5'/%3E%3Crect x='5' y='5' width='6' height='6' fill='%236fcf97'/%3E%3C/svg%3E"); } .pw-tree-icon.node { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='3' width='10' height='10' rx='1' fill='%23c586c0'/%3E%3C/svg%3E"); } .pw-tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; } .pw-tree-name.kind-scene { color: #f0a020; } .pw-tree-name.kind-camera { color: #e0c080; } .pw-tree-name.kind-canvas, .pw-tree-name.kind-ui { color: #6fcf97; } .pw-tree-name.kind-sprite, .pw-tree-name.kind-label, .pw-tree-name.kind-node { color: #c586c0; } .pw-tree-name.kind-script { color: #dddddd; } .pw-tree-item.selected .pw-tree-name { color: #fff; } .pw-tree-ts { flex-shrink: 0; font-size: 10px; font-weight: 700; color: #fff; background: #3794ff; border-radius: 2px; padding: 0 3px; line-height: 14px; height: 14px; } .pw-muted { color: var(--pw-muted); } .pw-warn { color: #cca700; } .pw-num { font-variant-numeric: tabular-nums; } .pw-table { width: 100%; border-collapse: collapse; } .pw-table th, .pw-table td { text-align: left; padding: 2px 4px; border-bottom: 1px solid #333; white-space: nowrap; } .pw-table tr:hover td { background: #2a2d2e; } .pw-table tr.selected td { background: #094771; } .pw-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; } .pw-chart-card { background: #1a1a1a; border: 1px solid var(--pw-border); border-radius: 4px; padding: 4px; } .pw-chart-card h4 { margin: 0 0 4px; font-size: 11px; color: var(--pw-muted); font-weight: 600; } .pw-chart-card canvas { width: 100%; height: 72px; display: block; } .pw-summary { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 6px; } .pw-summary span { color: var(--pw-muted); } .pw-summary b { color: #fff; font-weight: 600; } .pw-pick-overlay { position: fixed; pointer-events: none; z-index: 90; box-sizing: border-box; background: rgba(46, 204, 113, 0.38); border: 1px solid rgba(39, 174, 96, 0.95); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); border-radius: 1px; } .pw-pick-overlay[hidden] { display: none !important; } .pw-root.pw-inspect .pw-center #GameCanvas { cursor: crosshair; } /* Compact */ .pw-compact-bar { display: none; flex-shrink: 0; gap: 6px; padding: 6px 8px; background: #2d2d2d; border-top: 1px solid var(--pw-border); z-index: 20; flex-wrap: wrap; } .pw-drawer { position: fixed; z-index: 40; background: var(--pw-panel); border: 1px solid var(--pw-border); display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45); } .pw-drawer[hidden] { display: none !important; } .pw-drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid var(--pw-border); background: #2d2d2d; } .pw-drawer-body { flex: 1; min-height: 0; overflow: auto; } .pw-root.pw-mode-compact .pw-compact-bar { display: flex; } .pw-root.pw-mode-compact .pw-toolbar-left .pw-panel-btn { display: none; } .pw-root.pw-mode-compact .pw-dock-left, .pw-root.pw-mode-compact .pw-dock-right, .pw-root.pw-mode-compact .pw-dock-bottom, .pw-root.pw-mode-compact #pw-split-v1, .pw-root.pw-mode-compact #pw-split-v2, .pw-root.pw-mode-compact #pw-split-h { display: none !important; } .pw-root.pw-mode-compact.pw-compact-portrait .pw-drawer { left: 0; right: 0; bottom: 0; height: 62%; border-radius: 10px 10px 0 0; } .pw-root.pw-mode-compact.pw-compact-landscape .pw-drawer { top: 40px; right: 0; bottom: 0; width: min(420px, 70vw); border-radius: 10px 0 0 10px; } /* —— 控制台(对齐 Chrome DevTools Console) —— */ .pw-console-head { flex-wrap: wrap; gap: 6px; } .pw-console-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; } .pw-console-levels { display: inline-flex; align-items: center; gap: 2px; } .pw-console-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #c7c7c7; font-size: 11px; line-height: 1; cursor: pointer; } .pw-console-chip:hover { background: #3c4043; color: #e8eaed; } .pw-console-chip.active { background: #3c4043; color: #fff; border-color: #5f6368; } .pw-console-chip[data-level="error"].active { background: #4b1113; border-color: #8a1a1f; color: #ffc7c7; } .pw-console-chip[data-level="warn"].active { background: #332b00; border-color: #634b00; color: #fdd663; } .pw-console-chip-n { min-width: 14px; padding: 0 4px; border-radius: 7px; background: #202124; color: #9aa0a6; font-size: 10px; line-height: 14px; text-align: center; } .pw-console-chip.active .pw-console-chip-n { background: rgba(0, 0, 0, 0.35); color: inherit; } .pw-console-filter { width: 120px; max-width: 40vw; } .pw-console-list, .pw-console-list * { font-family: "Consolas", "Courier New", Menlo, Monaco, monospace !important; } .pw-console-list { overflow: auto; background: #202124; font-size: 12px !important; line-height: 1.4 !important; color: #e8eaed; padding: 0; user-select: text; -webkit-user-select: text; } .pw-console-list .pw-console-msg, .pw-console-list .pw-console-stack, .pw-console-list .pw-v-fmt, .pw-console-list .pw-v-text, .pw-console-list .pw-v-string, .pw-console-list .pw-v-error { user-select: text; -webkit-user-select: text; cursor: text; } .pw-console-empty { color: #9aa0a6; padding: 10px 12px; } .pw-console-row { display: flex; align-items: flex-start; gap: 6px; padding: 3px 8px 3px 4px; border-top: 1px solid transparent; border-bottom: 1px solid #292a2d; min-height: 20px; } .pw-console-row:hover { background: #292a2d; } .pw-console-row.level-warn { background: #332b00; color: #fdd663; border-top-color: #634b00; border-bottom-color: #634b00; } .pw-console-row.level-error { background: #4b1113; color: #ffc7c7; border-top-color: #8a1a1f; border-bottom-color: #8a1a1f; } .pw-console-row.level-debug { color: #9aa0a6; } .pw-console-icon { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 3px; background: center / 12px 12px no-repeat; } .pw-console-icon-warn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23f29700' d='M8 1L1 14h14L8 1zm0 4l4.5 7h-9L8 5zm-.75 2v3h1.5V7h-1.5zM8 12a.9.9 0 110-1.8A.9.9 0 018 12z'/%3E%3C/svg%3E"); } .pw-console-icon-error { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle fill='%23e81123' cx='8' cy='8' r='7'/%3E%3Cpath fill='%23fff' d='M5.2 4.5L4.5 5.2 7.3 8l-2.8 2.8.7.7L8 8.7l2.8 2.8.7-.7L8.7 8l2.8-2.8-.7-.7L8 7.3 5.2 4.5z'/%3E%3C/svg%3E"); } .pw-console-icon-info { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle fill='%233794ff' cx='8' cy='8' r='7'/%3E%3Cpath fill='%23fff' d='M7.25 4h1.5v1.5h-1.5V4zM7.25 7h1.5v5h-1.5V7z'/%3E%3C/svg%3E"); } .pw-console-count { flex: 0 0 auto; min-width: 16px; height: 14px; margin-top: 3px; padding: 0 4px; border-radius: 7px; background: #3c4043; color: #e8eaed; font-size: 10px !important; line-height: 14px; text-align: center; } .pw-console-msg { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; color: inherit; } .pw-console-src { flex: 0 0 auto; max-width: 36%; margin-left: auto; padding-left: 8px; color: #9aa0a6; font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; user-select: text; -webkit-user-select: text; } .pw-console-row:hover .pw-console-src { color: #8ab4f8; } .pw-console-src-empty { min-width: 0; padding: 0; } .pw-console-stack-spacer { flex: 0 0 10px; width: 10px; } .pw-console-stack-toggle { flex: 0 0 10px; margin-top: 2px; } .pw-console-toggle { cursor: pointer; display: inline-flex; align-items: flex-start; gap: 3px; user-select: none; -webkit-user-select: none; } .pw-console-caret { display: inline-block; width: 0; height: 0; margin-top: 5px; border-style: solid; border-width: 4px 0 4px 6px; border-color: transparent transparent transparent #9aa0a6; transform: rotate(0deg); } .pw-console-toggle.open .pw-console-caret { transform: rotate(90deg); } .pw-console-children { margin: 2px 0 2px 12px; padding-left: 8px; border-left: 1px solid #3c4043; } .pw-console-prop { padding: 1px 0; } .pw-console-stack { margin: 4px 0 0; padding: 0; background: transparent; color: inherit; white-space: pre-wrap; word-break: break-word; } /* %c 内联样式优先;无样式时跟控制台默认前景色 */ .pw-v-fmt { color: inherit; } .pw-v-text { color: #e8eaed; } /* 仅对象属性展开时的字符串值(带引号),消息参数用 .pw-v-text */ .pw-v-string { color: #f28b82; } .pw-v-number { color: #a8c7fa; } .pw-v-boolean { color: #c58af9; } .pw-v-null, .pw-v-undefined { color: #9aa0a6; } .pw-v-function { color: #fdd663; } .pw-v-object { color: #e8eaed; } .pw-v-key { color: #a8c7fa; } .pw-v-error { color: #ff8a80; } .pw-v-symbol { color: #fdd663; } .pw-v-muted { color: #9aa0a6; } .pw-float-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: #2a2a2a; border-bottom: 1px solid var(--pw-border); cursor: grab; flex-shrink: 0; user-select: none; touch-action: none; } .pw-float-head:active { cursor: grabbing; } .pw-float-title { color: #fff; font-weight: 600; padding: 2px 4px; border-radius: 3px; pointer-events: none; } .pw-float-hint { color: var(--pw-muted); font-size: 10px; margin-left: auto; pointer-events: none; } .pw-float-close { flex-shrink: 0; cursor: pointer; } .pw-float-dock-dragging, .pw-float-dragging { opacity: 0.85; } .pw-float-dragging { pointer-events: none !important; } .pw-float-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; cursor: default; touch-action: auto; } .pw-float-body .pw-panel-root, .pw-float-body .pw-panel-inner { height: 100%; min-height: 0; } .pw-preview-box { width: 100%; min-height: 80px; background: #111; border: 1px solid var(--pw-border); display: flex; align-items: center; justify-content: center; margin-top: 6px; } .pw-preview-box canvas { max-width: 100%; max-height: 160px; } .pw-field-grid { display: grid; grid-template-columns: 72px 1fr; gap: 4px 6px; align-items: center; } .pw-comp-block { border: 1px solid var(--pw-border); border-radius: 3px; padding: 6px; margin-bottom: 6px; } .pw-comp-block h5 { margin: 0 0 4px; color: #9cdcfe; font-size: 12px; } /* —— 属性面板(Creator 风格) —— */ .pw-inspector-body { padding: 0 !important; overflow: auto; background: #252526; } .pw-inspector-empty { padding: 24px 12px; text-align: center; color: var(--pw-muted); } .pw-insp-section { border-bottom: 1px solid #1e1e1e; } .pw-insp-sec-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #2d2d30; color: #e0e0e0; font-weight: 600; font-size: 11px; letter-spacing: 0.02em; cursor: pointer; user-select: none; } .pw-insp-sec-head:hover { background: #333337; } .pw-insp-caret { width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 5px solid #c5c5c5; transition: transform 0.12s ease; } .pw-insp-section.open .pw-insp-caret { transform: rotate(90deg); } .pw-insp-sec-body { display: none; padding: 8px 10px 10px; background: #252526; } .pw-insp-section.open .pw-insp-sec-body { display: block; } .pw-insp-row { display: grid; grid-template-columns: minmax(96px, 0.95fr) minmax(110px, 1.25fr); align-items: start; column-gap: 10px; margin-bottom: 7px; min-height: 22px; } .pw-insp-label { color: #b0b0b0; font-size: 11px; line-height: 1.35; text-align: left; padding-top: 3px; word-break: break-word; overflow-wrap: anywhere; hyphens: auto; user-select: text; } .pw-insp-input { flex: 1; min-width: 0; height: 22px; padding: 0 6px; border: 1px solid #3c3c3c; border-radius: 2px; background: #1e1e1e; color: #cccccc; font: 11px/22px Consolas, "Courier New", monospace; outline: none; } .pw-insp-input:hover { border-color: #555; } .pw-insp-input:focus { border-color: var(--pw-accent); background: #1a1a1a; } .pw-insp-num { font-variant-numeric: tabular-nums; } .pw-insp-xyz { flex: 1; display: flex; gap: 4px; min-width: 0; } .pw-insp-axis { flex: 1; display: flex; align-items: center; min-width: 0; background: #1e1e1e; border: 1px solid #3c3c3c; border-radius: 2px; overflow: hidden; } .pw-insp-axis:focus-within { border-color: var(--pw-accent); } .pw-insp-axis-tag { flex: 0 0 16px; text-align: center; font-size: 10px; font-weight: 700; color: #1e1e1e; background: #888; line-height: 20px; } .pw-insp-axis:nth-child(1) .pw-insp-axis-tag { background: #e06c75; } .pw-insp-axis:nth-child(2) .pw-insp-axis-tag { background: #98c379; } .pw-insp-axis:nth-child(3) .pw-insp-axis-tag { background: #61afef; } .pw-insp-axis .pw-insp-input { border: none; background: transparent; height: 20px; padding: 0 4px; } .pw-insp-check { position: relative; width: 28px; height: 16px; margin-top: 3px; cursor: pointer; } .pw-insp-check input { position: absolute; opacity: 0; width: 0; height: 0; } .pw-insp-check span { position: absolute; inset: 0; border-radius: 999px; background: #3c3c3c; border: 1px solid #555; transition: background 0.12s ease; } .pw-insp-check span::after { content: ''; position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%; background: #ccc; transition: transform 0.12s ease; } .pw-insp-check input:checked + span { background: var(--pw-accent); border-color: var(--pw-accent); } .pw-insp-check input:checked + span::after { transform: translateX(12px); background: #fff; } .pw-insp-muted { color: var(--pw-muted); font-size: 11px; padding: 4px 0; } .pw-insp-select { cursor: pointer; } .pw-insp-ref { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 6px; border: 1px solid #2f5d50; border-radius: 2px; background: #1a2e28; color: #9cdcfe; overflow: hidden; } .pw-insp-ref-kind { flex: 0 0 auto; color: #4ec9b0; font-size: 10px; } .pw-insp-ref-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pw-insp-color { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; } .pw-insp-color-picker { width: 28px; height: 22px; padding: 0; border: 1px solid #3c3c3c; border-radius: 2px; background: transparent; cursor: pointer; } .pw-insp-color-hex { flex: 1; min-width: 0; } /* —— 可拖拽停靠 —— */ .pw-dock { display: flex; flex-direction: column; } .pw-dock-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 4px; background: #2a2a2a; border-bottom: 1px solid var(--pw-border); flex-shrink: 0; min-height: 26px; } .pw-dock-tab { appearance: none; border: 1px solid transparent; background: transparent; color: var(--pw-muted); padding: 2px 8px; border-radius: 3px 3px 0 0; cursor: pointer; font: inherit; } .pw-dock-tab:hover { color: #fff; background: #333; } .pw-dock-tab.active { color: #fff; background: var(--pw-panel); border-color: var(--pw-border); border-bottom-color: var(--pw-panel); } .pw-dock-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; } .pw-panel-root, .pw-dockable { display: flex; flex-direction: column; height: 100%; min-height: 0; } .pw-dockable-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; } .pw-drag-handle { cursor: grab; } .pw-drag-handle:active { cursor: grabbing; } .pw-dragging { opacity: 0.55; } .pw-drop-zone { position: absolute; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(55, 148, 255, 0.25); border: 2px dashed var(--pw-accent); color: #fff; font-weight: 600; pointer-events: auto; } .pw-drop-zone[hidden] { display: none !important; } .pw-drop-zone.active { background: rgba(55, 148, 255, 0.45); } .pw-drop-left { left: 0; top: 10%; bottom: 10%; width: 22%; } .pw-drop-right { right: 0; top: 10%; bottom: 10%; width: 22%; } .pw-drop-bottom { left: 20%; right: 20%; bottom: 0; height: 28%; } .pw-drop-float { left: 30%; right: 30%; top: 20%; height: 30%; } .pw-float-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; } .pw-float-win { position: absolute; width: 320px; height: 360px; background: var(--pw-panel); border: 1px solid var(--pw-accent); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); pointer-events: auto; display: flex; flex-direction: column; overflow: hidden; border-radius: 4px; } .pw-float-win .pw-panel-root, .pw-float-win .pw-dockable { height: 100%; } /* —— 真实设备边框(纯 CSS:侧键 / 刘海 / 灵动岛 / Home) —— */ .pw-device-stage { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; background: radial-gradient(ellipse at center, #2c2c30 0%, #0e0e10 72%); } .pw-device-scale { position: absolute; left: 8px; bottom: 6px; color: var(--pw-muted); font-size: 11px; z-index: 2; pointer-events: none; } .pw-device-bezel { --pw-shell-r: 40px; --pw-screen-r: 30px; --pw-bezel-x: 12px; --pw-bezel-y: 12px; position: relative; box-sizing: border-box; flex-shrink: 0; transform: none !important; background: linear-gradient(145deg, #3f3f46 0%, #1c1c1f 42%, #2a2a2e 78%, #151518 100%); border-radius: var(--pw-shell-r); box-shadow: 0 0 0 1px #0a0a0a, 0 0 0 3px #4a4a50, 0 0 0 4px #1a1a1c, 0 18px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.55); } .pw-device-bezel.no-frame { background: transparent !important; border-radius: 0 !important; padding: 0 !important; box-shadow: none !important; } .pw-device-bezel.no-frame .pw-device-btn, .pw-device-bezel.no-frame .pw-device-cutout, .pw-device-bezel.no-frame .pw-device-home-bar, .pw-device-bezel.no-frame .pw-device-home-btn, .pw-device-bezel.no-frame .pw-device-ear { display: none !important; } /* 侧键 */ .pw-device-btn { position: absolute; background: linear-gradient(180deg, #5a5a60, #2c2c30); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px #111; z-index: 4; pointer-events: none; } .pw-device-btn-silent { left: -3px; top: 18%; width: 3px; height: 4.5%; border-radius: 2px 0 0 2px; } .pw-device-btn-volup { left: -3px; top: 26%; width: 3px; height: 7%; border-radius: 2px 0 0 2px; } .pw-device-btn-voldown { left: -3px; top: 36%; width: 3px; height: 7%; border-radius: 2px 0 0 2px; } .pw-device-btn-power { right: -3px; top: 28%; width: 3px; height: 10%; border-radius: 0 2px 2px 0; } .pw-shell-android .pw-device-btn-silent { display: none; } .pw-shell-android .pw-device-btn-volup { top: 22%; height: 8%; } .pw-shell-android .pw-device-btn-voldown { top: 33%; height: 8%; } .pw-shell-android .pw-device-btn-power { top: 24%; height: 12%; } .pw-shell-tablet .pw-device-btn-silent, .pw-shell-tablet .pw-device-btn-volup, .pw-shell-tablet .pw-device-btn-voldown { display: none; } .pw-shell-tablet .pw-device-btn-power { top: 12%; height: 6%; } .pw-device-bezel.is-landscape .pw-device-btn-silent { left: 18%; top: auto; bottom: -3px; width: 4.5%; height: 3px; border-radius: 0 0 2px 2px; } .pw-device-bezel.is-landscape .pw-device-btn-volup { left: 26%; top: auto; bottom: -3px; width: 7%; height: 3px; border-radius: 0 0 2px 2px; } .pw-device-bezel.is-landscape .pw-device-btn-voldown { left: 36%; top: auto; bottom: -3px; width: 7%; height: 3px; border-radius: 0 0 2px 2px; } .pw-device-bezel.is-landscape .pw-device-btn-power { right: auto; left: 28%; top: -3px; width: 10%; height: 3px; border-radius: 2px 2px 0 0; } /* 听筒(经典机) */ .pw-device-ear { display: none; position: absolute; left: 50%; top: 3.2%; transform: translateX(-50%); width: 16%; height: 1.1%; min-height: 4px; background: #0c0c0e; border-radius: 999px; box-shadow: inset 0 0 0 1px #222; z-index: 5; pointer-events: none; } .pw-shell-classic .pw-device-ear { display: block; } /* 刘海 / 灵动岛 / 打孔 */ .pw-device-cutout { display: none; position: absolute; z-index: 6; pointer-events: none; background: #050505; box-shadow: inset 0 0 0 1px #1a1a1a; } .pw-device-bezel.has-cutout .pw-device-cutout { display: block; } .pw-device-bezel.has-notch .pw-device-cutout { top: 10px; left: 50%; transform: translateX(-50%); width: 36%; height: 22px; border-radius: 0 0 14px 14px; } .pw-device-bezel.has-notch .pw-device-cutout::after { content: ''; position: absolute; right: 14%; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #1e3a5f, #0a1520 70%); box-shadow: 0 0 0 1px #222; } .pw-device-bezel.has-island .pw-device-cutout { top: 12px; left: 50%; transform: translateX(-50%); width: 28%; max-width: 120px; height: 24px; border-radius: 999px; } .pw-device-bezel.has-island .pw-device-cutout::before { content: ''; position: absolute; right: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #243b55, #0a1018 70%); } .pw-device-bezel.has-punch .pw-device-cutout { top: 10px; left: 50%; transform: translateX(-50%); width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #1a3350, #05080c 75%); } /* Home 指示条 / 实体 Home 键 */ .pw-device-home-bar { display: none; position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); width: 34%; max-width: 140px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.35); z-index: 6; pointer-events: none; } .pw-device-bezel.has-home-bar:not(.is-landscape) .pw-device-home-bar { display: block; } .pw-device-home-btn { display: none; position: absolute; left: 50%; bottom: 2.6%; transform: translateX(-50%); width: 14%; aspect-ratio: 1; max-width: 52px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #3a3a40 0%, #1a1a1e 62%, #0c0c0e 100%); box-shadow: inset 0 0 0 2px #4a4a50, inset 0 0 0 4px #1c1c1f, 0 0 0 1px #0a0a0a; z-index: 6; pointer-events: none; } .pw-device-bezel.has-home-btn:not(.is-landscape) .pw-device-home-btn { display: block; } .pw-device-bezel.is-landscape.has-home-btn .pw-device-home-btn { display: block; left: auto; right: 2.6%; bottom: 50%; transform: translateY(50%); width: auto; height: 14%; aspect-ratio: 1; } .pw-device-screen { overflow: hidden; border-radius: var(--pw-screen-r, 8px); background: #000; position: relative; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); } .pw-device-bezel.no-frame .pw-device-screen { border-radius: 0; } .pw-device-screen #content, .pw-device-screen .contentWrap, .pw-device-screen #GameDiv, .pw-device-screen #Cocos3dGameContainer, .pw-device-screen #GameCanvas { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; margin: 0 !important; box-sizing: border-box !important; } .pw-device-screen #content, .pw-device-screen .contentWrap, .pw-device-screen #GameDiv, .pw-device-screen #Cocos3dGameContainer { position: absolute !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; overflow: hidden !important; } .pw-device-screen #GameCanvas { position: absolute !important; left: 0 !important; top: 0 !important; display: block !important; } .pw-center { position: relative; width: 100%; height: 100%; } /* —— 布局 v3:递归停靠树 —— */ .pw-workspace { flex: 1; min-height: 0; min-width: 0; display: flex; position: relative; overflow: hidden; background: #111; } .pw-game-host { width: 100%; height: 100%; min-width: 0; min-height: 0; } .pw-game-host.pw-game-compact { flex: 1; } .pw-split-node { display: flex; width: 100%; height: 100%; min-width: 0; min-height: 0; } .pw-split-node.pw-split-dir-h { flex-direction: row; } .pw-split-node.pw-split-dir-v { flex-direction: column; } .pw-split-child { display: flex; min-width: 0; min-height: 0; overflow: hidden; } .pw-splitter { flex: 0 0 4px; align-self: stretch; background: var(--pw-border); z-index: 20; position: relative; touch-action: none; } .pw-splitter-h { width: 4px; min-width: 4px; max-width: 4px; cursor: col-resize; } .pw-splitter-v { height: 4px; min-height: 4px; max-height: 4px; cursor: row-resize; } /* 扩大命中区,避免难抓 */ .pw-splitter-h::after { content: ''; position: absolute; top: 0; bottom: 0; left: -4px; width: 12px; } .pw-splitter-v::after { content: ''; position: absolute; left: 0; right: 0; top: -4px; height: 12px; } .pw-splitter:hover, .pw-splitter:active { background: var(--pw-accent); } body.pw-split-dragging { cursor: inherit; user-select: none !important; } body.pw-split-dragging iframe, .pw-iframe-passthrough iframe, .pw-iframe-passthrough .pw-game-iframe { pointer-events: none !important; } body.pw-split-dragging * { cursor: inherit !important; user-select: none !important; } .pw-leaf { display: flex; flex-direction: column; width: 100%; height: 100%; min-width: 0; min-height: 0; background: var(--pw-panel); border: 1px solid #1a1a1a; position: relative; } .pw-leaf-game { background: #000; border-color: #000; } .pw-leaf-tabbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 4px; background: #2a2a2a; border-bottom: 1px solid var(--pw-border); flex-shrink: 0; min-height: 26px; } .pw-leaf-tab { appearance: none; border: 1px solid transparent; background: transparent; color: var(--pw-muted); padding: 2px 10px; border-radius: 3px 3px 0 0; cursor: grab; font: inherit; } .pw-leaf-tab:hover { color: #fff; background: #333; } .pw-leaf-tab.active { color: #fff; background: var(--pw-panel); border-color: var(--pw-border); border-bottom-color: var(--pw-panel); } .pw-leaf-body { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; } .pw-panel-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 6px; border-bottom: 1px solid var(--pw-border); background: #2d2d2d; flex-shrink: 0; } .pw-panel-root { display: flex; flex-direction: column; height: 100%; min-height: 0; } .pw-panel-root .pw-panel-body, .pw-panel-root .pw-hier-tree { flex: 1; min-height: 0; } .pw-drop-overlay { position: absolute; z-index: 80; pointer-events: none; box-sizing: border-box; } .pw-drop-overlay[hidden] { display: none !important; } .pw-drop-edge { position: absolute; display: flex; align-items: center; justify-content: center; background: rgba(55, 148, 255, 0.18); border: 2px dashed transparent; color: transparent; font-size: 12px; font-weight: 600; } .pw-drop-e-center { inset: 22%; } .pw-drop-e-left { left: 0; top: 0; bottom: 0; width: 22%; } .pw-drop-e-right { right: 0; top: 0; bottom: 0; width: 22%; } .pw-drop-e-top { left: 0; right: 0; top: 0; height: 22%; } .pw-drop-e-bottom { left: 0; right: 0; bottom: 0; height: 22%; } .pw-drop-overlay.edge-center .pw-drop-e-center, .pw-drop-overlay.edge-left .pw-drop-e-left, .pw-drop-overlay.edge-right .pw-drop-e-right, .pw-drop-overlay.edge-top .pw-drop-e-top, .pw-drop-overlay.edge-bottom .pw-drop-e-bottom { background: rgba(55, 148, 255, 0.45); border-color: var(--pw-accent); color: #fff; } .pw-drop-overlay.is-game .pw-drop-e-center { display: none; } /* 组停靠:整条带就是新建区预览 */ .pw-drop-overlay.is-region .pw-drop-e-center { inset: 0; } .pw-drop-overlay.is-region .pw-drop-e-left, .pw-drop-overlay.is-region .pw-drop-e-right, .pw-drop-overlay.is-region .pw-drop-e-top, .pw-drop-overlay.is-region .pw-drop-e-bottom { display: none; } .pw-root.pw-mode-compact .pw-workspace { flex: 1; }