body {
  background: #111;
  color: #e8e8e8;
}

@media (display-mode: standalone) {
  body:not(.remote-body) {
    padding-top: env(safe-area-inset-top);
  }
}

.form-label,
.camera-count {
  color: #cfcfcf;
}

.form-select,
.form-control {
  background-color: #1b1b1b;
  color: #e8e8e8;
  border-color: #333;
}

.form-select:focus,
.form-control:focus {
  background-color: #1b1b1b;
  color: #e8e8e8;
  border-color: #666;
  box-shadow: none;
}

.form-control::placeholder {
  color: #888;
}

.stream-card {
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
}

.stream-title {
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  border-bottom: 1px solid #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.stream-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.stream-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

.remote-body {
  min-height: 100dvh;
  background: #0a0a0a;
  overflow-x: hidden;
}

.remote-body .navbar {
  display: none;
}

.remote-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.9rem calc(1.25rem + env(safe-area-inset-bottom));
  background: #111;
  display: flex;
  flex-direction: column;
}

.remote-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-bottom: 0.85rem;
  background: #111;
}

.remote-gate {
  justify-content: center;
}

.remote-gate-card {
  width: 100%;
}

.remote-gate-title {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.remote-modes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.3rem;
  margin-top: 0.85rem;
  padding: 0.3rem;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 12px;
}

.remote-mode-btn {
  min-height: 42px;
  padding: 0.35rem 0.25rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #cfcfcf;
  font-size: 0.78rem;
  font-weight: 600;
  touch-action: manipulation;
}

.remote-mode-btn.is-active {
  background: #dc3545;
  color: #fff;
}

.remote-all-msg {
  padding: 1rem;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 12px;
  color: #cfcfcf;
}

.remote-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.remote-input,
.remote-action-btn {
  min-height: 48px;
  font-size: 16px;
}

.remote-groups {
  display: grid;
  gap: 0.7rem;
  flex: 1;
}

.remote-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 72px;
  padding: 0.95rem 1rem;
  background: #1b1b1b;
  color: #e8e8e8;
  border: 1px solid #333;
  border-radius: 12px;
  text-align: left;
  touch-action: manipulation;
}

.remote-group-btn:active,
.remote-group-btn.is-active {
  border-color: #dc3545;
  background: #2a1518;
}

.remote-group-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.remote-group-count {
  flex-shrink: 0;
  min-width: 2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #2a2a2a;
  color: #cfcfcf;
  text-align: center;
  font-size: 0.85rem;
}

.remote-install {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding-top: 0.9rem;
  background: linear-gradient(to bottom, transparent, #111 18%);
}

.remote-install .btn {
  min-height: 52px;
}

.remote-label {
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.remote-current {
  font-size: 1.05rem;
  font-weight: 600;
}

.remote-display {
  flex-shrink: 0;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #444;
  color: #aaa;
  font-size: 0.75rem;
}

.remote-display.is-online {
  border-color: #1f8a4c;
  color: #6fdd9a;
}
