:root {
  color-scheme: light;
  --remote-ink:#262238; --remote-muted:#6c657d; --remote-paper:#fff;
  --remote-line:#e5deee; --remote-purple:#6b24c6; --remote-soft:#f3ecfd;
  font-family:"Segoe UI",Inter,"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif;
  color:var(--remote-ink); background:#f8f6fc; font-synthesis:none; line-height:1.45;
}
* { box-sizing:border-box; }
body { margin:0; }
[hidden] { display:none!important; }
button,select,textarea { font:inherit; }
button,select { min-height:42px; border:1px solid var(--remote-line); border-radius:10px; background:var(--remote-paper); color:var(--remote-ink); padding:9px 14px; }
button { cursor:pointer; font-weight:600; }
button:hover:not(:disabled) { border-color:#b99ae0; background:var(--remote-soft); }
button:disabled,select:disabled,textarea:disabled { opacity:.55; cursor:not-allowed; }
button:focus-visible,select:focus-visible,textarea:focus-visible,canvas:focus-visible { outline:3px solid #b37bee; outline-offset:3px; }
.remote-session { min-height:100vh; min-height:100dvh; height:100dvh; display:flex; flex-direction:column; min-width:0; }
.remote-header { display:flex; align-items:center; flex-wrap:wrap; gap:16px; padding:16px clamp(16px,2vw,28px); background:linear-gradient(115deg,#6d21c8,#3b167d); color:#fff; }
.remote-identity { min-width:0; flex:1 1 260px; }
.remote-brand { font-size:11px; font-weight:700; letter-spacing:.08em; opacity:.8; }
h1 { font-size:20px; line-height:1.25; margin:4px 0; overflow-wrap:anywhere; }
.remote-identity p { margin:4px 0 0; font-size:12px; opacity:.82; overflow-wrap:anywhere; }
.remote-state { display:flex; align-items:center; gap:8px; font-size:13px; max-width:100%; overflow-wrap:anywhere; }
.remote-state-dot { width:8px; height:8px; flex-shrink:0; border-radius:50%; background:#d5c4ef; }
[data-session-state="READY"] .remote-state-dot { background:#91f1ba; }
.remote-danger { color:#fff; border-color:#ffffff42; background:#ffffff12; }
.remote-danger:hover:not(:disabled) { color:#fff; border-color:#ffd2dc; background:#a6355e; }
.remote-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px clamp(16px,2vw,28px); background:var(--remote-paper); }
.remote-scale-label { display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:12px; color:var(--remote-muted); }
.remote-scale-label select { max-width:100%; }
.remote-input-note { font-size:12px; color:var(--remote-muted); margin-left:auto; min-width:0; overflow-wrap:anywhere; }
.remote-power-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; max-width:100%; }
.remote-power-note { flex:1 1 220px; max-width:360px; min-width:0; font-size:12px; color:var(--remote-muted); overflow-wrap:anywhere; }
.remote-keyboard { padding:16px clamp(16px,2vw,28px); background:#f5f0fc; border-top:1px solid var(--remote-line); }
.remote-keyboard label { font-size:13px; font-weight:600; }
.remote-text-row { display:flex; align-items:stretch; gap:10px; margin-top:8px; }
.remote-text-row textarea { flex:1; min-width:0; resize:vertical; max-height:160px; border:1px solid #cfc0df; border-radius:10px; background:var(--remote-paper); padding:10px; }
.remote-keyboard p { margin:10px 0 0; font-size:12px; color:var(--remote-muted); }
.remote-key-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.remote-key-row button { font-size:12px; padding:8px 12px; }
.remote-viewport { position:relative; flex:1 1 auto; min-width:0; min-height:240px; overflow:auto; background:#100d18; overscroll-behavior:contain; }
.remote-stage { min-width:100%; min-height:100%; display:grid; place-items:center; }
#remote-canvas { display:block; flex-shrink:0; touch-action:none; cursor:crosshair; outline-offset:-3px; }
.remote-overlay { position:absolute; inset:0; display:grid; place-items:center; padding:24px; color:#ebe3f7; pointer-events:none; }
.remote-message-card { max-width:480px; width:100%; text-align:center; border-radius:18px; padding:28px; background:#251d36; overflow-wrap:anywhere; }
.remote-message-mark { display:inline-grid; place-items:center; width:48px; height:48px; border-radius:14px; background:#7939c9; font-size:27px; font-weight:750; }
.remote-message-card h2 { font-size:20px; line-height:1.3; margin:18px 0 10px; }
.remote-message-card p { font-size:14px; color:#c8bfd6; margin:0; }
.remote-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:10px clamp(16px,2vw,28px) max(10px,env(safe-area-inset-bottom)); background:var(--remote-paper); }
.remote-footer p { margin:0; font-size:11px; color:var(--remote-muted); }
.remote-android-nav { display:flex; gap:6px; border-radius:14px; background:#16101f; padding:4px; }
.remote-android-nav button { display:grid; place-items:center; width:52px; color:#f6f0fc; background:transparent; border-color:transparent; }
.remote-android-nav button:hover:not(:disabled) { color:#fff; background:#3c2755; }
.remote-android-nav svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; }
#remote-back svg { fill:currentColor; stroke:none; }
.remote-noscript { margin:16px; color:#8a1a40; }
@media(max-width:640px) {
  .remote-header { gap:12px; padding:12px 16px; }
  .remote-identity { flex-basis:calc(100% - 150px); }
  .remote-state { order:3; width:100%; }
  .remote-toolbar { gap:8px; padding:10px 12px; }
  .remote-input-note { flex-basis:100%; margin-left:0; }
  .remote-power-controls { flex-basis:100%; }
  .remote-power-note { max-width:none; flex-basis:100%; }
  .remote-text-row { flex-wrap:wrap; }
  .remote-text-row textarea { flex-basis:100%; }
  .remote-footer { justify-content:center; padding:8px 12px max(8px,env(safe-area-inset-bottom)); }
  .remote-footer p { flex-basis:100%; text-align:center; }
  .remote-message-card { padding:22px 18px; }
}
.remote-details-toggle { position:absolute; top:12px; right:12px; z-index:2; box-shadow:0 3px 16px #100d1840; }
.remote-details-panel { position:fixed; top:max(12px,env(safe-area-inset-top)); right:max(12px,env(safe-area-inset-right)); z-index:10; width:min(440px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain; padding:20px; border:1px solid var(--remote-line); border-radius:18px; background:var(--remote-paper); box-shadow:0 12px 48px #100d1860; }
.remote-details-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.remote-details-heading h2 { min-width:0; font-size:18px; margin:0; overflow-wrap:anywhere; }
.remote-details-panel p { font-size:12px; color:var(--remote-muted); overflow-wrap:anywhere; }
.remote-capacity-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:16px 0; }
.remote-capacity-grid div { min-width:0; border-radius:12px; padding:12px; background:var(--remote-soft); overflow-wrap:anywhere; }
.remote-capacity-grid dt { font-size:12px; color:var(--remote-muted); }
.remote-capacity-grid dd { margin:6px 0 0; font-size:16px; font-weight:600; }
@media(max-width:360px) { .remote-capacity-grid { grid-template-columns:minmax(0,1fr); } .remote-details-heading { flex-wrap:wrap; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }
