* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 600px; height: 600px; overflow: hidden; }
body {
  background: #0a0a0a; color: #f2f2f2;
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
}
#app { width: 600px; height: 600px; position: relative; }

.screen { display: none; width: 600px; height: 600px; position: absolute; top: 0; left: 0; }
.screen.active { display: block; }

.header { display: flex; align-items: baseline; justify-content: space-between; padding: 24px 28px 12px; }
.header h1 { font-size: 34px; font-weight: 700; }
.header-meta { font-size: 18px; color: #9aa0a6; }
.content { padding: 12px 28px; }

.field-group { margin-bottom: 18px; }
.field-label { display: block; font-size: 18px; color: #9aa0a6; margin-bottom: 6px; }
.text-input {
  width: 100%; font-size: 22px; padding: 14px 16px; border-radius: 12px;
  background: #1b1b1d; color: #fff; border: 2px solid #2a2a2e;
}
.text-input:focus, .focusable:focus { outline: none; border-color: #4f8cff; }

.btn {
  display: inline-block; font-size: 22px; padding: 14px 22px; border-radius: 12px;
  background: #1f6feb; color: #fff; border: 2px solid transparent; cursor: pointer; width: 100%;
}
.btn:focus { border-color: #9cc3ff; }
.status-line { margin-top: 14px; font-size: 18px; color: #9aa0a6; min-height: 22px; }

.cam-img { width: 600px; height: 600px; object-fit: cover; display: block; background: #000; }
.cam-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 18px;
  align-items: center; justify-content: center; background: #000;
}
.cam-placeholder-text { font-size: 26px; color: #ff8080; }
.cam-placeholder .btn { width: auto; }
.cam-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
}
.cam-label { font-size: 30px; font-weight: 700; text-shadow: 0 2px 6px #000; }
.cam-dots { display: flex; gap: 8px; }
.cam-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4); }
.cam-dots .dot.on { background: #fff; }

.toggle-list { padding: 12px 28px; display: flex; flex-direction: column; gap: 18px; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-radius: 16px; background: #1b1b1d; border: 3px solid #2a2a2e;
}
.toggle-row.focused { border-color: #4f8cff; background: #15233f; }
.toggle-name { font-size: 28px; font-weight: 600; }
.toggle-state { font-size: 26px; color: #9aa0a6; }
.toggle-row.confirm .toggle-state { color: #ffb454; }
.toggle-row.on .toggle-state, .toggle-state.open { color: #5fd07a; }

.toast {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: #2a2a2e; color: #fff; padding: 14px 22px; border-radius: 12px; font-size: 20px;
  max-width: 520px; text-align: center;
}
.toast.error { background: #5a1f1f; }
.hidden { display: none !important; }
