:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #111318; color: #e6e8ec;
  font: 15px/1.4 -apple-system, system-ui, "PingFang SC", sans-serif; }
.hidden { display: none !important; }

/* 登录 */
.auth { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.card { width: min(360px, 100%); background: #1a1d24; border: 1px solid #262a33;
  border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card h1 { margin: 0; font-size: 20px; }
.hint { margin: 0; color: #8b93a1; font-size: 13px; }
.card input { padding: 12px 14px; border-radius: 10px; border: 1px solid #2f3542;
  background: #0e1015; color: #e6e8ec; font-size: 16px; }
.card button { padding: 12px 14px; border: 0; border-radius: 10px; background: #3b82f6;
  color: #fff; font-size: 16px; font-weight: 600; }
.card button:active { background: #2f6fe0; }
.err { color: #ff6b6b; font-size: 13px; min-height: 1em; }

/* 主界面 */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.statusbar { padding: 6px 12px; font-size: 12px; background: #16181e; border-bottom: 1px solid #262a33;
  display: flex; align-items: center; gap: 10px; min-height: 30px; }
.statusbar.bad { background: #3a1620; color: #ffb3b3; border-bottom-color: #5a2230; }
.statusbar .dot { width: 8px; height: 8px; border-radius: 50%; background: #57c46a; }
.statusbar.bad .dot { background: #ff5b5b; }
.stage { flex: 1; min-height: 0; display: grid; place-items: center; background: #000; overflow: hidden; }
.screen { display: block; touch-action: none; background: #000; }
.overlay { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none;
  color: #9aa3b2; font-size: 14px; text-align: center; padding: 24px; }

/* 工具条 */
.toolbar { display: flex; gap: 6px; padding: 6px 8px; background: #16181e; border-top: 1px solid #262a33;
  align-items: center; flex-wrap: nowrap; overflow-x: auto; }
.tk { flex: 0 0 auto; min-width: 38px; height: 38px; border: 1px solid #2f3542; border-radius: 8px;
  background: #21252e; color: #e6e8ec; font-size: 15px; padding: 0 10px; }
.tk:active { background: #2f6fe0; }
.tk.primary { background: #3b82f6; border-color: #3b82f6; color: #fff; font-weight: 600; }
#compose { flex: 1 1 auto; min-width: 80px; height: 38px; border: 1px solid #2f3542; border-radius: 8px;
  background: #0e1015; color: #e6e8ec; font-size: 16px; padding: 0 12px; }
