:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --line: #dfe3e8;
  --text: #1d2430;
  --muted: #6b7686;
  --accent: #7f56d9;
  --accent-bg: #f4f0ff;
  --warn-bg: #fff4d6;
  --warn-line: #e6c25c;
  --err: #b42318;
  --ok: #067647;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}
body {
  font:
    13px/1.45 -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
h1 {
  font-size: 16px;
  margin: 0;
}
h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 4px 0 8px;
}
.mono,
.marks .off {
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* две колонки: плеер / события; каждая прокручивается сама */
.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: 100vh;
  max-width: 100vw;
}
.main,
.side {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px;
  min-width: 0;
}
.side {
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.brand {
  color: var(--muted);
  font-size: 12px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.summary .k {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.summary .v {
  word-break: break-word;
}

.status {
  color: var(--muted);
  padding: 6px 0;
}
.status[data-kind="err"] {
  color: var(--err);
}
.status[data-kind="ok"] {
  color: var(--ok);
}
.status.small {
  padding: 2px 0;
}
.warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 10px;
}

.stage {
  max-width: 100%;
  overflow: hidden;
}
.stage .rr-player {
  max-width: 100%;
  box-shadow: none;
  border: 1px solid var(--line);
}
.note {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.marks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.marks li {
  display: grid;
  grid-template-columns: 54px 10px minmax(0, 1fr);
  align-items: baseline;
  gap: 0 6px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
}
.marks li[tabindex] {
  cursor: pointer;
}
.marks li[tabindex]:hover,
.marks li[tabindex]:focus-visible {
  background: var(--accent-bg);
  outline: none;
}
.marks li.cur {
  box-shadow: inset 3px 0 0 var(--accent);
  background: var(--accent-bg);
}
.marks li.outside {
  color: var(--muted);
}
.marks li[hidden] {
  display: none;
}
.marks .off {
  color: var(--muted);
}
.marks .body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.marks .title {
  font-weight: 600;
}
.marks li.alert .title {
  color: var(--err);
}
.marks .detail {
  color: var(--muted);
  font-size: 12px;
  word-break: break-word;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    height: auto;
  }
  .side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tab {
  font: inherit;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  cursor: pointer;
}
.tab[aria-pressed="true"] {
  border-color: currentColor;
  font-weight: 600;
}
