:root { scroll-behavior: smooth; }

.demo-header-label {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  background: var(--surface-alt);
  font-size: 0.7rem;
  font-weight: 800;
}
.demo-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-bottom: 16px;
  padding: 7px 11px;
  border: 1px solid #b9cbd8;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  color: #354b5c;
  background: #eef6fc;
  font-size: 0.82rem;
}
.demo-notice p { margin: 0; }
.demo-mark {
  flex: none;
  padding: 3px 6px;
  border-radius: 3px;
  color: #ffffff;
  background: var(--blue);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.demo-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 14px;
}
.demo-control-note { margin-right: auto; color: var(--muted); font-size: 0.8rem; }
.demo-controls .small-button { min-height: 34px; padding: 6px 10px; }
.realtime-label.is-stopped { color: var(--amber); border-color: #d3ae61; background: var(--amber-bg); }
.realtime-label.is-stopped::before { background: #d28700; }
#dashboard-history-grid .summary-card { min-width: 0; }
.demo-metric { display: block; margin-top: 7px; color: var(--muted); font-size: 0.78rem; }
.demo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 22px;
  padding: 13px 2px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}
.demo-footer span { margin-right: auto; font-weight: 700; }
.demo-footer a { color: var(--blue); font-weight: 700; }
.demo-static-note { margin: 10px 2px 0; color: var(--muted); font-size: 0.8rem; }
.demo-empty { padding: 14px 6px; color: var(--muted); }
.demo-event-state { font-size: 0.78rem; }
.demo-event-channel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-controls button:focus-visible,
.demo-footer a:focus-visible,
.nav-item:focus-visible,
.settings-nav button:focus-visible {
  outline: 3px solid rgba(7, 94, 168, 0.28);
  outline-offset: 2px;
}
@media (max-width: 760px) {
  .demo-notice { align-items: flex-start; }
  .demo-header-label { display: none; }
  .demo-controls { flex-wrap: wrap; }
  .demo-control-note { flex: 1 0 100%; }
}
@media (max-width: 500px) {
  .demo-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
  .demo-footer span { margin-right: 0; }
  .demo-controls .small-button { flex: 1 1 auto; }
  .demo-controls #reset-demo { flex-basis: 100%; }
}
