:root{color-scheme:dark;font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;background:#101419;color:#e8edf4}*{box-sizing:border-box}body{margin:0}header{height:100px;max-width:1240px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:20px 32px;border-bottom:1px solid #2a323b}small{font-size:10px;letter-spacing:2px;color:#8fa5b9}h1{font-size:23px;margin:8px 0}#status{font-size:13px;color:#b9d9cb;background:#1e302c;padding:9px 14px;border-radius:24px}main{max-width:1240px;margin:auto;display:grid;grid-template-columns:1fr 330px;gap:32px;padding:28px 32px}.stage{height:calc(100dvh - 155px);min-height:400px;display:flex;align-items:center;justify-content:center;border:1px solid #26303b;border-radius:18px;background:#090d12;position:relative;overflow:hidden}canvas{max-width:100%;max-height:100%;width:auto;height:auto;display:none;touch-action:none;outline:none}canvas:focus{outline:1px solid #80c8ac}#placeholder{color:#687a8d;text-align:center;padding:30px}aside{padding:4px 0}h2{font-size:18px;margin-top:0}p{font-size:13px;line-height:1.6;color:#9daebf}label{display:block;font-size:12px;color:#bcc9d6;margin:20px 0 8px}input,textarea,button{font:inherit;border:1px solid #354251;border-radius:9px;color:inherit;background:#1b242e;padding:12px;width:100%}textarea{resize:vertical;font-size:14px}button{cursor:pointer;margin-top:8px;font-size:13px}button:hover{background:#2a3a49}button:disabled{opacity:.35;cursor:default}.primary{background:#92d6ba;color:#092a1d;border-color:#92d6ba;font-weight:650}.primary:hover{background:#b4ead2}.nav{display:flex;gap:6px;margin-top:12px}.nav button{padding:11px 3px;font-size:11px}.note{font-size:11px}#error{color:#ffb3aa}@media(max-width:760px){header{padding:16px;height:auto;gap:16px}h1{font-size:18px}#status{font-size:11px}main{grid-template-columns:1fr;padding:16px;gap:24px}.stage{height:65dvh;min-height:300px}aside{max-width:500px;width:100%;margin:auto}}

.spacer{height:900px}

/* Immersive phone view: preserve the whole remote display and its touch mapping. */
.fullscreen-entry{position:absolute;z-index:2;top:12px;right:12px;width:auto;margin:0;padding:10px 13px;background:#17232ee8;backdrop-filter:blur(12px);border-color:#536476;font-size:12px;min-height:44px}
.immersive-dock,.immersive-notice{display:none}
body.immersive{background:#000;overflow:hidden;overscroll-behavior:none;position:fixed;inset:0;width:100%;height:100%}
body.immersive header,body.immersive aside,body.immersive .fullscreen-entry{display:none}
body.immersive main{display:block;margin:0;padding:0;max-width:none}
body.immersive .stage{position:fixed;inset:0;z-index:100;height:100vh;height:100dvh;width:100%;min-height:0;border:0;border-radius:0;background:#000;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) calc(54px + env(safe-area-inset-bottom,0px)) env(safe-area-inset-left,0px)}
body.immersive canvas{max-width:100%;max-height:100%;outline:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
body.immersive .immersive-dock{position:fixed;z-index:102;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:center;gap:clamp(12px,7vw,50px);height:calc(54px + env(safe-area-inset-bottom,0px));padding:0 env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);background:#080a0d}
.immersive-dock button{flex:0 0 48px;width:48px;height:48px;min-height:44px;margin:0;border:0;background:transparent;color:#dce4ec;font-size:28px;border-radius:14px;padding:0;touch-action:manipulation}
.immersive-dock button:active{background:#29323e}
.immersive-dock #exit-fullscreen{color:#91a3b5;font-size:22px}
body.immersive:not(.streaming) .immersive-notice{position:fixed;z-index:101;top:calc(12px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;width:max-content;max-width:calc(100% - 24px);padding:8px 12px;border:1px solid #334252;background:#17212ded;border-radius:14px;font-size:12px;color:#d9e5f0}
.immersive-notice span{min-width:0;overflow-wrap:anywhere}
.immersive-notice button{width:auto;flex:none;margin:0;padding:10px;min-height:44px;font-size:12px}
:fullscreen{background:#000}
@media(max-width:760px){input,textarea{font-size:16px}.fullscreen-entry{top:8px;right:8px}}

.network-settings{margin-top:28px;padding-top:18px;border-top:1px solid #354251}.network-settings summary{font-size:16px;font-weight:600;cursor:pointer;padding:10px 0}.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:18px;font-size:14px}.settings-heading button{width:auto;margin:0;padding:9px;font-size:11px}.proxy-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.network-settings select{width:100%;border:1px solid #354251;border-radius:9px;color:inherit;background:#1b242e;padding:12px;font:inherit;font-size:14px}#network-result{font-size:12px;white-space:pre-wrap;color:#b7decf}.network-settings.busy button{opacity:.5;pointer-events:none}.network-settings input,.network-settings textarea{font-size:14px}@media(max-width:760px){.network-settings input,.network-settings textarea,.network-settings select{font-size:16px}}

.test-scope{display:flex;gap:10px;align-items:center;line-height:1.5}.test-scope input{width:18px;height:18px;flex:none}

.dual-link{color:#9bdabc;font-size:13px;text-decoration:none;white-space:nowrap}body.immersive .dual-link{display:none}
