* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #fff;
  color: #111827;
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  -webkit-user-select: none;
  user-select: none;
}
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.login, .app { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.login { margin-top: 18vh; }
.login input, .name { border: 1px solid #e4e7ec; border-radius: 10px; padding: 12px 14px; -webkit-user-select: text; user-select: text; }
.err { color: #dc2626; min-height: 1.4em; font-size: 15px; }

.btn { border: 1px solid #e4e7ec; background: #fff; border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.btn.ghost { border-color: transparent; color: #6b7280; }

.big {
  margin-top: 8vh;
  border: 0;
  border-radius: 999px;
  padding: 26px;
  background: #111827;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.live { display: flex; flex-direction: column; gap: 14px; margin-top: 4vh; }
.state { font-size: 22px; font-weight: 700; text-align: center; padding: 18px; border-radius: 14px; background: #f6f7f9; }
.state.rec { background: #dc2626; color: #fff; }
.state.ok { background: #f0fdf4; color: #16a34a; }
.state.bad { background: #fef2f2; color: #dc2626; }

.meter { height: 10px; background: #f0f1f4; border-radius: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: #16a34a; transition: width .1s linear; }
.meter i.hot { background: #dc2626; }

.gain { display: flex; flex-direction: column; gap: 6px; color: #6b7280; font-size: 15px; }
.gain b { color: #111827; }
.gain input { width: 100%; }
.toggle { display: flex; align-items: center; gap: 10px; }
.toggle input { width: 22px; height: 22px; }

.hint { color: #6b7280; font-size: 13px; margin-top: 16px; }

.blackout { position: fixed; inset: 0; background: #000; z-index: 10; }
