:root { --bg: #101214; --panel: #1b1f23; --text: #e6e6e6; --muted: #8a9199; --accent: #e8a400; --ok: #3fb950; --bad: #f85149; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; }
button { font: inherit; background: var(--accent); color: #111; border: 0; border-radius: 6px; padding: 10px 16px; cursor: pointer; }
button.link { background: none; color: var(--muted); text-decoration: underline; padding: 6px 0; }
input { font: inherit; width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #333; background: var(--panel); color: var(--text); }

/* login */
.login main { max-width: 340px; margin: 18vh auto 0; padding: 0 16px; }
.login h1 { font-weight: 600; letter-spacing: .02em; }
.login form { display: flex; flex-direction: column; gap: 10px; }
.login label { color: var(--muted); font-size: 14px; }
#code { font-size: 28px; letter-spacing: .4em; text-align: center; }
#msg { color: var(--muted); min-height: 1.4em; }

/* pilot */
.pilot { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.pilot header { display: flex; align-items: center; gap: 14px; padding: 8px 12px; background: var(--panel); font-size: 14px; }
.pilot header .spacer { flex: 1; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); margin-right: 5px; }
.dot.on { background: var(--ok); }
.pilot header button { padding: 5px 10px; font-size: 13px; background: #2d333b; color: var(--text); }
.stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; background: #000; min-height: 0; }
video { max-width: 100%; max-height: 100%; transition: transform .2s; }
.overlay { position: absolute; color: var(--muted); }
.pad { position: absolute; right: 16px; bottom: 16px; display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 64px); gap: 6px; }
.pad button { background: rgba(40, 44, 50, .75); color: var(--text); font-size: 24px; padding: 0; user-select: none; touch-action: none; }
.pad button.active { background: var(--accent); color: #111; }
.pad .up { grid-column: 2; grid-row: 1; } .pad .left { grid-column: 1; grid-row: 2; }
.pad .stop { grid-column: 2; grid-row: 2; font-size: 14px; } .pad .right { grid-column: 3; grid-row: 2; }
.pad .down { grid-column: 2; grid-row: 3; }
.hint { position: absolute; left: 12px; bottom: 12px; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .hint { display: none; } }
