:root {
  font-family: Inter, "Noto Sans SC", system-ui, sans-serif;
  color: #203344;
  background: #f3f6f8;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.boot {
  padding: 40px;
}
button,
a,
input {
  touch-action: manipulation;
}
header.top {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid #dde5eb;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #087f8c;
  color: white;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #728695;
}
.brand h1 {
  font-size: 18px;
  margin: 3px 0;
  font-weight: 650;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.layout {
  max-width: 1800px;
  margin: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(390px, 1fr);
  gap: 24px;
  height: calc(100vh - 124px);
}
.observer {
  align-self: start;
  min-width: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e7edf1;
}
.panel-title h2 {
  margin: 0;
  font-size: 15px;
}
.panel-title small {
  color: #758797;
}
.screen {
  background: #101923;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.screen img,
.screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
}
.screen .hide {
  visibility: hidden;
}
.livebadge {
  position: absolute;
  left: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 1px;
  background: #12232be8;
  color: #fff;
  border: 1px solid #ffffff25;
  border-radius: 5px;
  padding: 5px 9px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #48d6b1;
}
.screen-time {
  position: absolute;
  right: 14px;
  bottom: 12px;
  background: #10212ccc;
  color: #dfebf1;
  font: 11px monospace;
  padding: 4px 7px;
  border-radius: 4px;
}
.transport {
  padding: 12px 16px 16px;
}
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}
.duration {
  font: 12px monospace;
  color: #647989;
  flex: 1;
}
.timeline {
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}
.segment {
  height: 14px;
  background: #b9d7de;
  min-width: 1px;
  border-radius: 2px;
  flex-shrink: 1;
}
.segment.played {
  background: #168d9b;
}
.timeline input {
  appearance: none;
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  background: transparent;
  cursor: pointer;
}
.timeline input::-webkit-slider-thumb {
  appearance: none;
  background: white;
  border: 3px solid #087f8c;
  width: 14px;
  height: 24px;
  border-radius: 5px;
  box-shadow: 0 1px 6px #0003;
}
.timeline input::-moz-range-thumb {
  background: white;
  border: 3px solid #087f8c;
  width: 8px;
  height: 18px;
  border-radius: 5px;
}
.timeline input::-moz-range-track {
  background: transparent;
}
.timeline-labels {
  display: flex;
  justify-content: space-between;
  color: #8495a2;
  font-size: 10px;
}
.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  color: #768a99;
  font-size: 11px;
}
.legend b {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: #168d9b;
  border-radius: 2px;
  margin-right: 6px;
}
.observation-note {
  margin-top: 16px;
  padding: 14px 18px;
  color: #657a88;
  font-size: 12px;
  line-height: 1.8;
  display: flex;
  gap: 10px;
}
.logs {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.logs-head {
  padding: 16px 18px 12px;
}
.logs-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.logs-title h2 {
  margin: 0;
  font-size: 15px;
}
.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.event-list {
  overflow: auto;
  padding: 4px 14px 20px;
  scroll-behavior: smooth;
  flex: 1;
  min-height: 150px;
}
.event-card {
  background: #fff;
  border: 1px solid #e1e8ed;
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 7px 10px;
  margin: 6px 0;
  transition: box-shadow 0.15s;
}
.event-card.selected {
  box-shadow: 0 0 0 2px #26a8b6;
  background: #f4fcfd;
}
.event-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 11px;
}
.event-head time {
  margin-left: auto;
  color: #8797a3;
  font: 11px monospace;
}
.event-function {
  font:
    11px ui-monospace,
    SFMono-Regular,
    monospace;
  color: #718594;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.execution-code {
  margin: 5px 0;
  padding: 6px 8px;
  background: #f4f7fa;
  border: 1px solid #e8eef3;
  border-radius: 5px;
  color: #284d68;
  font:
    11px/1.45 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: visible;
  max-height: none;
  tab-size: 4;
}
.event-head time {
  flex-shrink: 0;
}
.event-footer .MuiButton-root {
  padding: 0 5px;
  min-height: 22px;
  font-size: 11px;
}
.event-head svg,
.result-line svg {
  font-size: 15px;
}
.event-summary {
  font-size: 12px;
  line-height: 1.7;
  color: #617585;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.6;
  color: #34576a;
  overflow-wrap: anywhere;
}
.result-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.event-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
  padding-top: 0;
}
.event-footer details {
  min-width: 0;
  flex: 1;
  font-size: 11px;
  color: #7a8d9b;
}
.event-footer summary {
  cursor: pointer;
  width: max-content;
}
.event-footer pre {
  max-height: none;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f5f7f9;
  padding: 10px;
  font-size: 11px;
  color: #456;
}
.event-footer:has(details[open]) {
  align-items: flex-start;
}
.empty {
  padding: 40px 16px;
  text-align: center;
  color: #889aa7;
  font-size: 13px;
}
.log-caption {
  font-size: 11px;
  color: #8294a1;
  margin-top: 10px;
}
.notice {
  padding: 10px 18px;
  background: #fff8e5;
  font-size: 12px;
  color: #866b20;
}
.stream-select {
  max-width: 210px;
}
.count {
  font: 11px monospace;
  color: #8396a3;
}
.error-text {
  color: #c04954;
}
.timeline-marker {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: #9567d7;
  pointer-events: none;
}
@media (max-width: 1050px) {
  .layout {
    padding: 16px;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(350px, 1fr);
  }
  header.top {
    padding: 0 16px;
  }
}
@media (max-width: 800px) {
  .layout {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .logs {
    height: 75vh;
  }
  .top-actions .subtitle {
    display: none;
  }
  header.top {
    height: 68px;
  }
  .brand h1 {
    font-size: 15px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .screen {
    min-height: 210px;
  }
}
/* Keep long recordings and compact viewports inside their panels. */
.observer {
  width: 100%;
}
.controls .duration {
  min-width: 90px;
}
.legend {
  flex-wrap: wrap;
}
.top-actions button {
  white-space: nowrap;
}
@media (max-width: 800px) {
  .brand .eyebrow {
    display: none;
  }
  .brandmark {
    width: 32px;
    height: 32px;
  }
  .brand {
    gap: 8px;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions .MuiChip-root {
    max-width: 105px;
  }
  .logs {
    width: 100%;
  }
}

.activity-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 16px;
}
.activity-column > .logs {
  flex: 1;
}
.pending-questions {
  padding: 16px 18px;
  max-height: 45vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.pending-questions h2 {
  font-size: 15px;
}
.pending-questions h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.question-form {
  display: grid;
  gap: 14px;
  padding: 14px 0;
}
.question-form + .question-form {
  border-top: 1px solid #d9dfe4;
}
.question-form h3 {
  margin: 0;
}
.question-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.question-form > button {
  justify-self: start;
}
@media (max-width: 700px) {
  .pending-questions {
    max-height: none;
  }
}

.execution-code .hljs-keyword,
.execution-code .hljs-literal {
  color: #9b459d;
}
.execution-code .hljs-string {
  color: #277b57;
}
.execution-code .hljs-number {
  color: #b36320;
}
.execution-code .hljs-built_in,
.execution-code .hljs-title {
  color: #2465a7;
}
.execution-code .hljs-comment {
  color: #7e8f9d;
  font-style: italic;
}
.playback-speed {
  min-width: 72px;
  font-size: 12px !important;
}
.playback-speed .MuiSelect-select {
  padding: 4px 26px 4px 8px !important;
}
.panel-title {
  gap: 12px;
}
.panel-title small {
  text-align: right;
}
@media (max-width: 800px) {
  header.top {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

.timeline-scroll {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: #8eb9c1 #e7eff2;
  overscroll-behavior-x: contain;
}
.timeline-track {
  min-width: 100%;
}
.timeline-scroll::-webkit-scrollbar {
  height: 8px;
}
.timeline-scroll::-webkit-scrollbar-thumb {
  background: #8eb9c1;
  border-radius: 4px;
}
.timeline-scroll::-webkit-scrollbar-track {
  background: #e7eff2;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .activity-column > .logs {
    flex: none;
  }
}

.session-tabs {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #dde5eb;
  min-height: 48px;
}
.session-tabs .MuiTabs-root {
  flex: 1;
  min-width: 0;
}
.offline-label {
  color: #718594;
  font-size: 12px;
  padding: 0 16px;
}

.session-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 24px; }
.session-picker .MuiInputBase-root { min-width: 290px; max-width: 100%; }

.screen.multiview .livebadge {
  top: auto;
  bottom: 12px;
}
