:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --ink: #17211f;
  --muted: #5a6864;
  --line: #cdd8d3;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-strong: #0b4f4a;
  --warn: #b7791f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 380px;
  gap: 18px;
  width: min(1400px, calc(100vw - 32px));
  margin: 16px auto;
}

.viewer,
.qos {
  min-width: 0;
}

video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 126px);
  background: #101816;
  border: 1px solid var(--line);
  object-fit: contain;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(92px, .6fr) minmax(150px, .9fr) 92px 92px;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
}

button {
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  border-color: var(--line);
  background: #d9e1dd;
  color: var(--muted);
  cursor: default;
}

.qos {
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

h1 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 9px 0;
  text-align: left;
  vertical-align: top;
}

th {
  width: 112px;
  color: var(--muted);
  font-weight: 700;
}

td {
  overflow-wrap: anywhere;
}

pre {
  min-height: 180px;
  max-height: calc(100vh - 474px);
  overflow: auto;
  margin: 14px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f9fbfa;
  color: #26332f;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
    width: min(100vw - 20px, 720px);
    margin: 10px auto;
  }

  video {
    max-height: 70vh;
  }

  .toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .toolbar label:first-child {
    grid-column: 1 / -1;
  }

  .qos {
    padding: 12px;
  }
}
