:root {
  color-scheme: dark;
  font-family: "Courier New", ui-monospace, Consolas, monospace;
  background: #010301;
  color: #a5cf9a;
  --green: #5dff3b;
  --dim: #1d6b20;
  --line: #214b24;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  padding: max(16px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 50% 5%, #102010 0, #030703 44%, #010201 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: .18;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, #68ff4a22 4px);
  animation: signal 7s steps(1) infinite;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 19;
  box-shadow: inset 0 0 110px #000, inset 0 0 35px #000;
}
@keyframes signal { 0%, 94%, 100% { opacity: .16; } 95% { opacity: .28; } 96% { opacity: .1; } }
.panel {
  position: relative;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  background: #030603dc;
  box-shadow: 0 0 30px #1fff1810, inset 0 0 45px #000;
}
.panel::before, .panel::after { content: ""; position: absolute; width: 58px; height: 16px; border-top: 2px solid var(--green); top: -2px; }
.panel::before { left: -2px; border-left: 2px solid var(--green); }
.panel::after { right: -2px; border-right: 2px solid var(--green); }
.eyebrow, .signal { color: var(--green); font-size: 11px; letter-spacing: .17em; margin: 0 0 8px; text-shadow: 0 0 8px #57ff35; }
h1 { margin: 0; color: #bdffae; font-size: clamp(38px, 10vw, 70px); letter-spacing: .1em; line-height: 1; text-shadow: 2px 0 #184d18, -1px 0 #64ff43, 0 0 18px #32ff2244; }
.privacy { color: #6f8c6c; line-height: 1.45; font-size: 12px; border-left: 2px solid var(--dim); padding-left: 10px; }
.preview { position: relative; overflow: hidden; aspect-ratio: 4/3; margin: 20px 0 14px; border: 1px solid var(--line); background: #000; box-shadow: inset 0 0 40px #000; }
.preview video, .preview canvas { position: absolute; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); filter: saturate(.55) contrast(1.1); }
.preview-label { position: absolute; left: 10px; bottom: 8px; padding: 4px 7px; border: 1px solid var(--line); background: #000d; color: var(--green); font-size: 10px; letter-spacing: .08em; }
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }
.status-grid div { display: flex; justify-content: space-between; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.status-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.status-grid span, label { color: #6f8c6c; font-size: 11px; letter-spacing: .06em; }
.status-grid strong { font-size: 12px; color: #b38f47; }
.status-grid strong[data-state="on"] { color: var(--green); text-shadow: 0 0 7px #52ff38; }
.status-grid strong[data-state="off"] { color: #b75c4c; }
.controls { display: grid; gap: 11px; margin-top: 14px; }
.control-hint { margin: -4px 4px 0; color: #789272; font-size: 10px; line-height: 1.4; text-align: center; }
.procedure { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-left: 2px solid var(--green); background: #071007; color: #83a87d; font-size: 11px; line-height: 1.45; }
.procedure div { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #173819; }
.procedure div:last-child { padding-bottom: 0; border-bottom: 0; }
.procedure b { color: var(--green); letter-spacing: .07em; }
.procedure span { padding-left: 26px; color: #8eaa89; }
.procedure code { color: #d0ffc6; font: inherit; }
label { display: grid; gap: 6px; }
input { width: 100%; border: 1px solid #315b34; background: #020502; color: #d3ffca; padding: 12px; font: 700 18px inherit; letter-spacing: .12em; text-transform: uppercase; outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 10px #4cff3422; }
#relayUrl { text-transform: none; font-size: 12px; letter-spacing: 0; }
.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button { min-height: 48px; border: 1px solid var(--green); background: #0b1b0c; color: var(--green); font: 700 13px inherit; letter-spacing: .08em; cursor: pointer; text-transform: uppercase; }
button:hover { background: #173a18; }
button.secondary { background: transparent; color: #84b77b; border-color: #315b34; }
button:disabled { opacity: .38; cursor: wait; }
.error { white-space: pre-wrap; color: #ff8585; border-left: 3px solid #b75c4c; padding: 10px; font-size: 12px; }
.diagnostics { margin-top: 14px; border: 1px solid #173819; background: #010401; color: #70956b; font-size: 10px; }
.diagnostics summary { padding: 9px 11px; color: #4f9a48; cursor: pointer; letter-spacing: .1em; }
.diagnostics[open] { display: grid; grid-template-columns: repeat(2, 1fr); padding-bottom: 7px; }
.diagnostics[open] summary { grid-column: 1 / -1; border-bottom: 1px solid #173819; margin-bottom: 5px; }
.diagnostics div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 10px; }
.diagnostics strong { color: #69e88b; }
@media (max-width: 480px) {
  .panel { padding: 13px; }
  .status-grid { grid-template-columns: 1fr; }
  .status-grid div:nth-child(odd) { border-right: 0; }
  .buttons { grid-template-columns: 1fr; }
  .diagnostics[open] { grid-template-columns: 1fr; }
}
