#live-history-root {
  display: block;
  margin-top: 16px;
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
}
#live-history-root[hidden],
#live-history-root [hidden] { display: none !important; }
#live-history-root .lh-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
#live-history-root .lh-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
#live-history-root h2,
#live-history-root h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.35;
}
#live-history-root h2 { font-size: 18px; }
#live-history-root h3 { font-size: 15px; }
#live-history-root .lh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue-text);
}
#live-history-root .lh-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--accent-blue-text);
  border: 1px solid var(--border);
}
#live-history-root .lh-help {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
}
#live-history-root .lh-notice {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
#live-history-root ul.lh-notice {
  padding-left: 30px;
}
#live-history-root ul.lh-notice li + li {
  margin-top: 4px;
}
#live-history-root .lh-notice.is-error { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.45); color: var(--text); }
#live-history-root .lh-notice.is-success { background: var(--primary-light); border-color: var(--primary); color: var(--accent-blue-text); }
#live-history-root .lh-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
#live-history-root .lh-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
#live-history-root .lh-field.is-wide,
#live-history-root .lh-actions { grid-column: 1 / -1; }
#live-history-root .lh-field input,
#live-history-root .lh-field select,
#live-history-root .lh-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
}
#live-history-root .lh-field input:focus,
#live-history-root .lh-field select:focus,
#live-history-root .lh-field textarea:focus,
#live-history-root .lh-button:focus-visible,
#live-history-root summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}
#live-history-root .lh-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
#live-history-root .lh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
#live-history-root #lh-save-manifest {
  align-self: flex-start;
}
#live-history-root .lh-button.is-primary { background: var(--primary); border-color: var(--primary); color: #ffffff; }
#live-history-root .lh-button:disabled { opacity: 0.55; cursor: not-allowed; }
#live-history-root .lh-status,
#live-history-root .lh-coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
#live-history-root details.lh-coverage {
  display: block;
}
#live-history-root .lh-results { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#live-history-root .lh-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
#live-history-root .lh-summary > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 0;
}
#live-history-root .lh-summary > div > span {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
#live-history-root .lh-summary > div > strong {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
#live-history-root .lh-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
#live-history-root .lh-table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 13px; text-align: left; }
#live-history-root .lh-table th,
#live-history-root .lh-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
#live-history-root .lh-table th { background: var(--surface-3); color: var(--accent-blue-text); font-weight: 700; white-space: nowrap; }
#live-history-root details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); padding: 8px 12px; }
#live-history-root summary { cursor: pointer; font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--accent-blue-text); border-radius: 6px; }
#live-history-root .lh-json {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: auto;
}
@media (max-width: 900px) { #live-history-root .lh-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { #live-history-root .lh-form { grid-template-columns: 1fr; } }
