.stream-slide {
  background: var(--wall-background, #000);
}
.sidebar {
  overflow-y: auto;
}
.sidebar .settings-nav-label {
  margin-top: 24px;
}
@media (min-width: 701px) {
  .sidebar nav {
    gap: 3px;
  }
  .sidebar nav button {
    padding-top: 9px;
    padding-bottom: 9px;
  }
}
.stream-host {
  position: absolute;
  inset: 0;
}
.stream-parking {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 320px;
  height: 180px;
  overflow: hidden;
  pointer-events: none;
}
.stream-media,
.touch-tile > img {
  width: 100%;
  height: 100%;
  display: block;
}
.stream-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, #000c);
  color: #fff;
  padding: 24px 14px 12px;
  font-size: clamp(13px, 1vw, 24px);
  pointer-events: none;
}
.stream-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0009;
  color: #ddd;
  text-align: center;
  padding: 20px;
  font-size: clamp(13px, 1vw, 22px);
  pointer-events: none;
}
.stream-status[hidden] {
  display: none;
}
#touch-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  background: var(--wall-background, #000);
  box-sizing: border-box;
}
#touch-view[hidden] {
  display: none;
}
.touch-tile {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: #000;
  border-radius: 8px;
}
.touch-notice {
  padding: 20px;
  color: #fff;
  overflow: auto;
}
.touch-active #stage,
.touch-active #info-panel {
  visibility: hidden;
}
.layout-preview {
  display: grid;
  gap: 6px;
  height: 180px;
  max-width: 420px;
  background: #111;
  padding: 8px;
  border-radius: 8px;
  margin: 18px 0;
}
.layout-preview span {
  display: grid;
  place-items: center;
  color: #aaa;
  background: #333;
  border-radius: 4px;
  font-size: 12px;
}
.layout-preview .notice-cell {
  background: var(--brand-yellow);
  color: var(--accent-ink, #111);
}
.touch-selection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}
.stream-card-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  background: #151515;
  color: #fff;
  padding: 16px;
}
.stream-card-preview svg {
  width: 45px;
  height: 45px;
}
.stream-card-preview small {
  color: #aaa;
}
.camera-live-preview {
  position: absolute;
  inset: 0;
  background: #000;
  pointer-events: none;
}
.reolink-editor {
  width: min(720px, 94vw);
}
.reolink-results[hidden] {
  display: none;
}
.reolink-selection-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 12px;
}
.reolink-channels {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
}
.reolink-channels small {
  display: block;
  color: #777;
  font-size: 12px;
}
.camera-live-preview .stream-label {
  display: none;
}
.camera-live-preview .stream-status {
  font-size: 12px;
  padding: 12px;
}
.camera-live-preview::after {
  content: 'LIVE';
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #143e2ee6;
  color: #a9f5ce;
  font-size: 10px;
  font-weight: 800;
}
@media (max-width: 700px) {
  .touch-selection {
    grid-template-columns: 1fr;
  }
}

.calendar-settings-preview {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #444;
}
.calendar-settings-preview [data-calendar-status] {
  padding: 12px 16px;
  border-radius: 8px;
  background: #303030;
  color: #f5f5f5;
}
.calendar-settings-preview [data-state='ok'] {
  color: #b9efcc;
  background: #173a28;
}
.calendar-settings-preview [data-state='error'] {
  color: #ffd0cb;
  background: #4b2424;
}
.calendar-settings-preview ol {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}
.calendar-settings-preview li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px;
  background: #242424;
  color: #f5f5f5;
  border-radius: 8px;
}
.calendar-settings-preview time {
  min-width: 155px;
  color: #d4d4d4;
}
.calendar-settings-preview strong {
  color: #f5f5f5;
  flex: 1;
  min-width: 180px;
  overflow-wrap: anywhere;
}

/* Keep each WhatsApp rule and its effective behavior visually together. */
.group-rule-card {
  border: 1px solid #626262;
  border-radius: 12px;
  padding: 18px;
  margin: 16px 0;
}
.group-rule-card > .check-row {
  font-weight: 700;
  font-size: 1.05rem;
}
.group-rule-card [data-group-rule][hidden] {
  display: none;
}
.group-rule-summary {
  border-left: 3px solid currentColor;
  padding: 10px 14px;
  margin: 14px 0 0;
  line-height: 1.6;
  white-space: normal;
}
#group-form > fieldset {
  margin-top: 24px;
  padding: 18px;
}
