/* 天玺远控 · 手机浏览器控制台 */
:root {
  color-scheme: dark;
  --bg: #0b0c0f; --panel: #15171c; --line: rgb(255 255 255 / .1); --fg: #eef0f4; --fg3: #8b919c;
  --a: #2793fb; --ok: #3ecf8e; --err: #f2555a;
  --font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
[hidden] { display: none !important; }
h1 { margin: 0 0 4px; font-size: 22px; }
p { margin: 0; }
.muted { color: var(--fg3); }
.center { text-align: center; padding: 16px; }
.small { font-size: 12px; padding: 4px; }
.grow { flex: 1; min-width: 0; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.err { color: var(--err); min-height: 1.5em; font-size: 13px; }
.btn { height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--fg); font: inherit; }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.primary { background: var(--a); border-color: var(--a); color: #fff; font-weight: 600; }
input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #0f1115; color: var(--fg); font: inherit; width: 100%; }
.page { min-height: 100%; }
#login { display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 12px; padding: 24px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 2; }
.devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 12px; }
.dev { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); font: inherit; text-align: left; }
.dev b { font-size: 15px; word-break: break-all; }
.dev small { color: var(--fg3); font-size: 12px; word-break: break-all; }
.dev .on { color: var(--ok); font-size: 12px; }
.view { display: flex; flex-direction: column; height: 100%; height: 100dvh; min-height: 0; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; }
#screen { display: block; max-width: 100%; max-height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 86%; padding: 12px 16px; border-radius: 12px; background: rgb(0 0 0 / .72); text-align: center; font-size: 14px; white-space: pre-line; }
.keys { display: flex; justify-content: space-around; padding: 6px 4px; border-top: 1px solid var(--line); }
.keys button { flex: 1; height: 44px; border: 0; background: none; color: var(--fg); font-size: 20px; }
.keys button:active { background: rgb(255 255 255 / .08); border-radius: 10px; }
.textbar { display: flex; gap: 8px; padding: 6px 10px; }
.textbar input { height: 36px; }
select.btn { appearance: none; -webkit-appearance: none; }
.sound-msg { cursor: pointer; text-decoration: underline; }
#sound[aria-pressed="true"], #mic[aria-pressed="true"] { border-color: var(--a); color: var(--a); }
