.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid var(--glass-rim);
  border-radius: 18px;
  background: var(--glass-chip);
  box-shadow: var(--shadow-chip);
  font-size: 14.5px;
}

.banner[data-tone="success"] { color: var(--good); }

.banner[data-tone="error"] { color: var(--bad); }

.banner[data-tone="debug"] {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 14px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.banner[data-tone="debug"] a { text-underline-offset: 3px; }

.banner[data-tone="debug"] a:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 3px;
  border-radius: 3px;
}

.banner[data-tone="debug"]::before {
  content: '';
  flex: none;
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wait);
}

.banner a {
  color: inherit;
  font-weight: 500;
}

.live {
  --live-tint: transparent;
  --live-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23A3A8B6' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='5' stroke-dasharray='2.1 2.1'/%3E%3C/svg%3E");
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 26px;
  margin: 0;
  padding: 0 10px 0 7px;
  border: 1px solid rgba(22, 26, 44, 0.08);
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(22, 26, 44, 0.05);
  color: rgba(22, 26, 44, 0.86);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.live[data-state="connecting"] { visibility: hidden; }

.live::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--live-glyph) center / 12px 12px no-repeat, var(--live-tint);
}

.live[data-state="waiting"]::before { animation: live-turn 3s linear infinite; }

.live[data-state="live"] {
  --live-tint: #DCF5E8;
  --live-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%2312A36B'/%3E%3C/svg%3E");
}

.live[data-state="live"]::after {
  content: '';
  position: absolute;
  top: calc(50% - 8px);
  left: 7px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 1px solid rgba(18, 163, 107, 0.55);
  border-radius: 50%;
  animation: live-ripple 2.4s var(--ease-quint) infinite;
}

.live[data-state="reconnecting"] {
  --live-tint: #FFEFD2;
  --live-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23D98200' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M8 3.6a4.4 4.4 0 1 1-4.4 4.4'/%3E%3C/svg%3E");
}

.live[data-state="reconnecting"]::before { animation: live-turn 0.9s linear infinite; }

.live[data-state="signed_out"] {
  --live-tint: #FFE1E6;
  --live-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23E3264C' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='m5.6 5.6 4.8 4.8m0-4.8-4.8 4.8'/%3E%3C/svg%3E");
}

@keyframes live-ripple {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(2); }
}

@keyframes live-turn {
  to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
  .live[data-state="live"]::after { animation: none; opacity: 0; }
  .live::before { animation: none !important; }
}

.live a { color: inherit; }
