* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #111; color: #ddd; font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { display: flex; flex-direction: column; overflow: hidden; }
body.login { align-items: center; justify-content: center; }
.card { background: #1c1c1e; padding: 32px; border-radius: 12px; display: flex; flex-direction: column; gap: 12px; width: 300px; }
.card h1 { margin: 0 0 8px; font-size: 20px; }
input, select, button, textarea { font: inherit; color: #eee; background: #2c2c2e; border: 1px solid #3a3a3c; border-radius: 6px; padding: 5px 8px; }
button { cursor: pointer; } button:hover { background: #3a3a3c; }
.err { color: #ff6b6b; min-height: 1em; }
#bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; background: #1c1c1e; border-bottom: 1px solid #2c2c2e; }
#bar label { display: flex; align-items: center; gap: 4px; color: #aaa; }
#bar .sep { flex: 0 0 8px; }
#stats { margin-left: auto; color: #888; font-variant-numeric: tabular-nums; }
.dot::before { content: "●"; margin-right: 4px; }
.dot.on::before { color: #32d74b; } .dot.off::before { color: #ff453a; } .dot.wait::before { color: #ffd60a; }
#stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; outline: none; overflow: hidden; background: #000; }
#screen { display: block; image-rendering: auto; cursor: default; touch-action: none; }
#stage:focus-within #screen, #stage:focus #screen { box-shadow: 0 0 0 1px #0a84ff55; }
#overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #888; font-size: 16px; pointer-events: none; }
#clip { padding: 8px; background: #1c1c1e; border-bottom: 1px solid #2c2c2e; display: flex; flex-direction: column; gap: 6px; }
#clip textarea { width: 100%; resize: vertical; }
#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #2c2c2e; padding: 10px 14px; border-radius: 8px; box-shadow: 0 4px 20px #0008; display: flex; gap: 10px; align-items: center; }
:fullscreen #bar, :-webkit-full-screen #bar { display: none; }
