#watch-panel[hidden] { display: none !important; }
#watch-panel {
  position: fixed;
  z-index: 60;
  inset: 88px 18px 48px auto;
  width: min(560px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  background: #181c20;
  color: #d1d5db;
  border-left: 1px solid #2d333b;
  padding: 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  overflow-y: auto;
  box-sizing: border-box;
  max-width: 100%;
  box-shadow: 0 12px 60px #0009;
  border: 1px solid var(--line, #2d333b);
  border-radius: 12px;
  background: var(--panel, #181c20);
}
.watch-launch { position:fixed;right:24px;bottom:46px;z-index:50;border:1px solid #34d399;background:#153a30;color:#b8ffe1;padding:12px 20px;border-radius:24px;font:600 14px inherit;cursor:pointer;box-shadow:0 5px 22px #0006; }
.watch-launch:focus-visible,#watch-panel button:focus-visible,#watch-panel select:focus-visible,#watch-panel summary:focus-visible { outline:2px solid #6ee7b7;outline-offset:3px; }
.watch-demo-wrap,.watch-select,.watch-card-head,.watch-finding-top { min-width:0; }
.watch-demo-wrap,.watch-card-head,.watch-finding-top { flex-wrap:wrap; }
.watch-select { max-width:100%; }
.watch-coverage { margin:6px 0; font-variant-numeric:tabular-nums; }
@media(max-width:600px) { #watch-panel{inset:76px 8px 42px;width:calc(100vw - 16px);padding:14px;} .watch-controls{flex-direction:column;}.watch-demo-wrap{flex-direction:column;}.watch-btn,.watch-select{min-height:44px;}.watch-header h2{font-size:1rem;}.watch-launch{right:12px;} }
@media(prefers-reduced-motion:reduce){.watch-btn{transition:none;}}
.watch-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; border-bottom: 1px solid #2d333b; padding-bottom: 0.5rem; }
.watch-header h2 { margin: 0; font-size: 1.1rem; color: #f3f4f6; font-weight: 600; }
.watch-btn-close { background: transparent; border: none; color: #9ca3af; font-size: 1.25rem; cursor: pointer; padding: 0.2rem 0.5rem; border-radius: 4px; }
.watch-btn-close:hover { color: #f3f4f6; background: #2d333b; }
.watch-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.watch-demo-wrap { display: flex; gap: 0.5rem; flex: 1 1 auto; }
.watch-select { background: #22272e; color: #e6edf3; border: 1px solid #373e47; border-radius: 6px; padding: 0.4rem 0.6rem; font-size: 0.8rem; flex: 1 1 auto; outline: none; }
.watch-btn { background: #2d333b; color: #e6edf3; border: 1px solid #444c56; border-radius: 6px; padding: 0.4rem 0.8rem; font-size: 0.8rem; cursor: pointer; transition: background 0.15s ease; }
.watch-btn:hover:not(:disabled) { background: #373e47; }
.watch-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.watch-btn-primary { background: #1f4236; border-color: #2e6955; color: #34d399; font-weight: 600; }
.watch-btn-primary:hover:not(:disabled) { background: #265545; }
.watch-btn-accent { background: #134e4a; border-color: #14b8a6; color: #5eead4; }
.watch-btn-accent:hover:not(:disabled) { background: #115e59; }
.watch-btn-sm { padding: 0.2rem 0.5rem; font-size: 0.75rem; margin-top: 0.4rem; }
.watch-body { display: flex; flex-direction: column; gap: 0.75rem; }
.watch-loading, .watch-empty { padding: 1.5rem; text-align: center; color: #8b949e; background: #1c2128; border-radius: 6px; }
.watch-card { border: 1px solid #30363d; background: #1c2128; border-radius: 6px; padding: 0.75rem; }
.watch-status-attention { border-left: 4px solid #f59e0b; }
.watch-status-clear { border-left: 4px solid #10b981; }
.watch-status-unobserved { border-left: 4px solid #6b7280; }
.watch-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.watch-badge { font-weight: 600; font-size: 0.85rem; color: #f3f4f6; }
.watch-time { font-size: 0.75rem; color: #8b949e; }
.watch-meta { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8125rem; color: #aab3bf; }
.watch-scope { color: #5eead4; font-weight: 500; }
.watch-alert { padding: 0.5rem; border-radius: 4px; font-size: 0.75rem; margin-top: 0.4rem; }
.watch-alert-warn { background: #422006; border: 1px solid #854d0e; color: #fef08a; }
.watch-alert-error { background: #450a0a; border: 1px solid #991b1b; color: #fecaca; display: flex; flex-direction: column; align-items: flex-start; }
.watch-findings-title { margin: 0.5rem 0 0.25rem; font-size: 0.9rem; color: #e6edf3; }
.watch-findings-list { display: flex; flex-direction: column; gap: 0.5rem; }
.watch-empty-findings { font-size: 0.8rem; color: #8b949e; font-style: italic; }
.watch-finding-item { background: #22272e; border: 1px solid #373e47; border-radius: 6px; padding: 0.6rem; }
.watch-finding-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.watch-finding-code { font-weight: 600; font-size: 0.8rem; color: #e6edf3; }
.watch-ver-tag { font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 500; }
.watch-ver-verified { background: #064e3b; color: #6ee7b7; }
.watch-ver-uncertain { background: #451a03; color: #fdba74; }
.watch-finding-path { font-family: monospace; font-size: 0.75rem; color: #9ca3af; word-break: break-all; }
.watch-details { margin-top: 0.4rem; font-size: 0.75rem; color: #8b949e; }
.watch-details summary { cursor: pointer; color: #5eead4; }
.watch-pre { background: #0d1117; padding: 0.5rem; border-radius: 4px; overflow-x: auto; color: #c9d1d9; font-size: 0.7rem; margin-top: 0.25rem; }

/* Watch Activity Dock */
#watch-activity.watch-activity-dock {
  max-height:calc(100dvh - 150px);
  overflow-y:auto;
  position: fixed;
  right: 16px;
  bottom: 48px;
  width: 350px;
  max-width: calc(100vw - 24px);
  z-index: 50;
  background: #181c20;
  border: 1px solid #2d333b;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  color: #d1d5db;
  font-family: inherit;
  font-size: 0.8125rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
}

#watch-activity .watch-activity-toast {
  background: #24292f;
  border: 1px solid #d97706;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#watch-activity .watch-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #fbbf24;
}

#watch-activity .watch-toast-msg {
  font-size: 0.8125rem;
  color: #f3f4f6;
  word-break: break-word;
}

#watch-activity .watch-toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

#watch-activity .watch-activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2d333b;
  padding-bottom: 0.4rem;
}

#watch-activity .watch-activity-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f3f4f6;
  margin: 0;
}

#watch-activity-status {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: #22272e;
  border: 1px solid #373e47;
  color: #9ca3af;
}

#watch-activity-status.status-current {
  background: #064e3b;
  color: #34d399;
  border-color: #059669;
}

#watch-activity-status.status-paused,
#watch-activity-status.status-stale {
  background: #451a03;
  color: #fbbf24;
  border-color: #d97706;
}

#watch-activity-status.status-offline {
  background: #374151;
  color: #9ca3af;
  border-color: #4b5563;
}

#watch-activity .watch-activity-stats {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.775rem;
}

#watch-activity .watch-stat-row {
  gap:12px;
  align-items:flex-start;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9ca3af;
}

#watch-activity .watch-stat-val {
  text-align:right;
  max-width:62%;
  overflow-wrap:anywhere;
  color: #e6edf3;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

#watch-activity .watch-activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid #2d333b;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

#watch-activity .watch-activity-footer .watch-launch,
#watch-activity .watch-activity-footer #watch-open {
  position: static !important;
  min-height: 44px;
  padding: 8px 16px;
  box-shadow: none;
}

#watch-activity-toggle {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

#watch-activity-feed {
  max-height: min(40dvh, 320px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 0.5rem;
}

#watch-activity-feed[hidden] {
  display: none !important;
}

#watch-activity .watch-feed-note {
  font-size: 0.7rem;
  color: #8b949e;
  margin-bottom: 0.25rem;
}

#watch-activity .watch-feed-row {
  width:100%;
  margin-bottom:6px;
  min-height: 44px;
  text-align: left;
  background: #22272e;
  border: 1px solid #373e47;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: #e6edf3;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  word-break: break-word;
}

#watch-activity .watch-feed-row:hover {
  background: #2d333b;
  border-color: #444c56;
}

#watch-activity .watch-feed-meta {
  gap:8px;
  flex-wrap:wrap;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #8b949e;
}

#watch-activity .watch-unread-badge {
  background: #059669;
  color: #ecfdf5;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 9999px;
  margin-left: 0.25rem;
}

@media (max-width: 380px) {
  #watch-activity.watch-activity-dock {
    right: 8px;
    bottom: 40px;
    width: calc(100vw - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #watch-activity * {
    transition: none !important;
    animation: none !important;
  }
}
#watch-activity button{min-height:44px;min-width:44px;font-family:inherit;}
#watch-activity button:focus-visible{outline:2px solid #6ee7b7;outline-offset:2px;}
#watch-activity .watch-activity-toast[data-tone="info"]{border-color:#2e6955;border-left-color:#34d399;}
#watch-activity .watch-activity-toast[data-tone="info"] .watch-toast-header{color:#6ee7b7;}
#watch-activity-observed{white-space:pre-line;overflow-wrap:anywhere;line-height:1.6;margin:2px 0;}
#watch-activity .watch-toast-header{gap:8px;overflow-wrap:anywhere;}
#watch-activity-feed{flex-shrink:1;min-height:90px;}
#watch-activity .watch-stat-val[data-attention="true"]{color:#fbbf24;font-weight:700;}
#watch-activity-feed>.watch-toast-header{position:sticky;top:-8px;background:#1c2128;z-index:1;}
