:root {
  color-scheme: dark;
  --bench: #16191d;
  --bench-2: #1f2428;
  --panel: #242a2f;
  --panel-soft: #2d343a;
  --optical: #f5f7f6;
  --optical-2: #e6eceb;
  --text: #f2f5f4;
  --text-dark: #1a2024;
  --muted: #9aa6a8;
  --muted-dark: #586365;
  --line: #3a4349;
  --line-bright: #56636b;
  --cyan: #16a3b8;
  --green: #58a866;
  --amber: #d99a2b;
  --red: #d64b3f;
  --shadow: rgba(0, 0, 0, 0.28);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bench);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(22, 163, 184, 0.08), transparent 230px),
    var(--bench);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  padding: 15px clamp(14px, 2vw, 28px) 28px;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(430px, 1fr) minmax(124px, auto);
  align-items: stretch;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(22, 163, 184, 0.1), transparent 40%),
    rgba(36, 42, 47, 0.97);
  box-shadow: 0 12px 30px var(--shadow);
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 3px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(142, 220, 231, 0.45) 0 1px,
      transparent 1px 18px
    );
  opacity: 0.58;
  pointer-events: none;
}

.run-strip,
.message,
.camera-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(36, 42, 47, 0.96);
  box-shadow: 0 12px 30px var(--shadow);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 62px;
  padding: 9px 14px 10px;
  border-right: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(22, 163, 184, 0.56);
  border-radius: 7px;
  background: #101315;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

h1 {
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 800;
  line-height: 1.18;
}

.subtle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.status-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr)) minmax(142px, 1.35fr);
  overflow: hidden;
}

.status-cell {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 9px 13px 10px;
  border-left: 1px solid var(--line);
}

.status-cell:first-child {
  border-left: 0;
}

.status-cell span,
.run-strip span,
.meta-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.status-cell strong,
.run-strip strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-cell strong,
.run-strip strong,
.camera-ip,
.camera-foot,
.artifact-links a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.status-text {
  color: var(--muted);
}

.status-text.ready,
.status-text.succeeded {
  color: var(--green);
}

.status-text.failed {
  color: var(--red);
}

.status-text.running,
.status-text.queued {
  color: var(--amber);
}

.primary {
  align-self: stretch;
  min-width: 124px;
  border: 0;
  border-left: 1px solid rgba(22, 163, 184, 0.38);
  border-radius: 0;
  background: var(--cyan);
  color: #071013;
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
}

.primary:hover {
  background: #40b8c8;
}

.primary:disabled {
  background: #69757c;
  color: #d6dddd;
  cursor: not-allowed;
}

.run-strip {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 0.9fr) minmax(140px, 0.9fr) minmax(110px, 0.55fr);
  gap: 0;
  min-height: 44px;
  margin-top: 8px;
  overflow: hidden;
}

.run-strip div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px 14px;
  border-left: 1px solid var(--line);
}

.run-strip div:first-child {
  border-left: 0;
}

.message {
  margin-top: 14px;
  padding: 12px 14px;
  border-color: rgba(214, 75, 63, 0.58);
  background: rgba(214, 75, 63, 0.14);
  color: #ffb8b2;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.camera-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
  gap: 14px;
  margin-top: 14px;
}

.camera-card {
  display: grid;
  grid-template-rows: auto minmax(360px, 52vh) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.camera-card.is-empty {
  border-style: dashed;
}

.camera-card.is-failed {
  border-color: rgba(214, 75, 63, 0.72);
}

.camera-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.camera-title {
  min-width: 0;
}

.camera-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}

.camera-title h2 {
  font-size: 15px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-ip {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.badge.neutral {
  color: var(--muted);
}

.badge.ready,
.badge.succeeded {
  color: var(--green);
}

.badge.failed {
  color: var(--red);
}

.badge.running,
.badge.queued {
  color: var(--amber);
}

.temperature-control {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
}

.temperature-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 26px;
  max-width: min(100%, 330px);
  padding: 4px 9px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}

.temperature-pill:hover {
  background: rgba(22, 163, 184, 0.08);
}

.temperature-compact-value {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  color: currentColor;
}

.temperature-compact-value strong {
  min-width: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
}

.temperature-pill.ready {
  border-color: rgba(88, 168, 102, 0.54);
  color: var(--green);
}

.temperature-pill.failed {
  border-color: rgba(214, 75, 63, 0.62);
  color: var(--red);
}

.temperature-pill.queued {
  border-color: rgba(217, 154, 43, 0.62);
  color: var(--amber);
}

.temperature-pill.has-alert {
  border-color: rgba(214, 75, 63, 0.78);
  background: rgba(214, 75, 63, 0.13);
  color: #ffb8b2;
}

.temperature-pill.has-alert:hover {
  background: rgba(214, 75, 63, 0.19);
}

.temperature-alert {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 184, 178, 0.44);
  color: #ffb8b2;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.temperature-alert[hidden] {
  display: none;
}

.media-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  background: #101315;
}

.media-tabs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 7px 10px;
  border-bottom: 1px solid #2c353a;
  background: #151a1d;
}

.media-tab-list {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  padding: 2px;
  border: 1px solid #2c353a;
  border-radius: 7px;
  background: #101315;
}

.media-tab {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  cursor: pointer;
}

.media-tab:hover {
  color: #b5c0c1;
}

.media-tab.is-active {
  background: rgba(22, 163, 184, 0.16);
  color: #8edce7;
}

.media-tab-actions {
  min-width: 0;
}

.media-tab-panels,
.media-tab-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.media-tab-panel {
  grid-template-rows: minmax(0, 1fr);
}

.media-tab-panel[hidden] {
  display: none;
}

.viewport-body {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.image-viewport .viewport-body {
  background:
    linear-gradient(90deg, rgba(26, 32, 36, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(26, 32, 36, 0.05) 1px, transparent 1px),
    var(--optical);
  background-size: 28px 28px;
}

.pointcloud-viewport .viewport-body {
  background:
    radial-gradient(circle at 50% 50%, rgba(88, 182, 194, 0.16), transparent 58%),
    #111719;
}

.viewport-body img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pointcloud-stage,
.pointcloud-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.pointcloud-stage {
  position: absolute;
  inset: 0;
}

.placeholder,
.viewer-note {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.viewer-note {
  position: absolute;
  inset: 0;
  z-index: 2;
  min-height: 0;
  background: rgba(8, 11, 13, 0.72);
  color: #c8d3d4;
  pointer-events: none;
}

.viewer-note.is-error {
  color: #ffb8b2;
}

.artifact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.artifact-links .viewport-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.artifact-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(22, 163, 184, 0.54);
  border-radius: 6px;
  color: #8edce7;
  font-size: 11px;
  font-weight: 760;
  text-decoration: none;
}

.artifact-links a:hover {
  background: rgba(22, 163, 184, 0.12);
}

.camera-foot {
  display: grid;
  grid-template-columns: minmax(88px, 0.62fr) minmax(100px, 0.7fr) minmax(250px, 1.45fr) minmax(220px, 1.3fr) minmax(90px, 0.5fr);
  gap: 0;
  border-top: 1px solid var(--line);
  color: #c0cbcc;
  font-size: 12px;
}

.camera-foot > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border-left: 1px solid var(--line);
}

.camera-foot > div:first-child {
  border-left: 0;
}

.camera-foot strong {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-foot .timing-breakdown strong {
  line-height: 1.45;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.camera-foot .output-directory strong,
.camera-foot .output-directory-button {
  line-height: 1.35;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.camera-foot .output-directory-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8edce7;
  font: inherit;
  font-weight: 720;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(22, 163, 184, 0.48);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.camera-foot .output-directory-button:hover {
  color: #b9f1f6;
  text-decoration-color: currentColor;
}

.camera-foot .output-directory-button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.camera-foot .output-directory-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.camera-foot .artifact-links {
  justify-content: flex-start;
}

.camera-foot .file-links-cell {
  padding-right: 9px;
  padding-left: 9px;
}

.camera-foot .file-links-cell .artifact-links {
  gap: 4px;
}

.camera-error {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(214, 75, 63, 0.5);
  color: #ffb8b2;
}

.empty-board {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  min-height: min(520px, calc(100vh - 210px));
  border: 1px dashed var(--line-bright);
  border-radius: 8px;
  background: rgba(36, 42, 47, 0.74);
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.measurement-panel {
  display: grid;
  grid-template-columns: minmax(170px, 0.42fr) minmax(0, 1fr);
  min-width: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(217, 154, 43, 0.1), transparent 34%),
    rgba(31, 36, 40, 0.97);
  box-shadow: 0 12px 30px var(--shadow);
  overflow: hidden;
}

.measurement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.measurement-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.measurement-title span,
.measurement-cell span,
.measurement-cell small,
.measurement-track-mark span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.measurement-title span {
  color: #f0cf8e;
}

.measurement-title h2 {
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.measurement-gauge {
  display: grid;
  grid-template-columns:
    minmax(116px, 0.72fr)
    minmax(190px, 1.2fr)
    minmax(116px, 0.72fr)
    minmax(116px, 0.72fr)
    minmax(116px, 0.72fr);
  min-width: 0;
}

.measurement-cell {
  display: grid;
  grid-template-rows: auto minmax(30px, 1fr) auto;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 92px;
  padding: 13px 15px;
  border-left: 1px solid var(--line);
}

.measurement-cell:first-child {
  border-left: 0;
}

.measurement-cell strong {
  min-width: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.measurement-cell small {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.measurement-cell-main {
  background:
    linear-gradient(180deg, rgba(22, 163, 184, 0.14), rgba(22, 163, 184, 0.04)),
    rgba(16, 19, 21, 0.38);
}

.measurement-cell-main strong {
  color: #8edce7;
  font-size: clamp(28px, 3.6vw, 52px);
}

.measurement-track {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr) minmax(112px, auto);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 11px 16px 13px;
  border-top: 1px solid var(--line);
  background: rgba(16, 19, 21, 0.36);
}

.measurement-track-mark {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.measurement-track-mark:last-child {
  justify-items: end;
  text-align: right;
}

.measurement-track-mark strong,
.measurement-track-needle strong {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.measurement-track-needle {
  display: grid;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.measurement-track-line {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(245, 247, 246, 0.32) 0 1px,
      transparent 1px 22px
    ),
    linear-gradient(
      90deg,
      rgba(217, 154, 43, 0.72),
      rgba(88, 168, 102, 0.72),
      rgba(217, 154, 43, 0.72)
    );
}

.measurement-track-line::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 2px;
  height: 18px;
  border-radius: 999px;
  background: #8edce7;
  box-shadow: 0 0 0 3px rgba(22, 163, 184, 0.18);
}

.temperature-modal[hidden] {
  display: none;
}

.temperature-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.temperature-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 9, 11, 0.72);
  cursor: pointer;
}

.temperature-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  min-width: 0;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: #151a1d;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.temperature-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: #1c2226;
}

.temperature-dialog-head h2 {
  font-size: 16px;
  font-weight: 820;
}

.temperature-dialog-close {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(22, 163, 184, 0.54);
  border-radius: 6px;
  background: transparent;
  color: #8edce7;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
}

.temperature-dialog-close:hover {
  background: rgba(22, 163, 184, 0.12);
}

.temperature-dialog-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: auto;
  padding: 14px;
}

.temperature-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.temperature-history-summary > .temperature-summary-cell {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 1px solid var(--line);
}

.temperature-history-summary > .temperature-summary-cell:first-child {
  grid-template-columns: minmax(0, 1fr);
  border-left: 0;
}

.temperature-summary-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.temperature-summary-main span,
.temperature-summary-peak span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.temperature-summary-main strong,
.temperature-summary-peak strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.temperature-summary-peak {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 92px;
  padding-left: 13px;
  border-left: 1px solid rgba(217, 154, 43, 0.38);
  color: #f0cf8e;
  text-align: right;
}

.temperature-summary-peak span,
.temperature-summary-peak strong {
  color: currentColor;
}

.temperature-summary-peak span {
  color: #b8a06d;
}

.temperature-summary-peak strong {
  font-weight: 860;
}

.temperature-chart-wrap {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(22, 163, 184, 0.08), transparent 52%),
    #0d1113;
  overflow: hidden;
}

.temperature-chart {
  display: block;
  width: 100%;
  height: 330px;
}

.temperature-tooltip-title {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.temperature-tooltip-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 6px;
  min-width: 126px;
  line-height: 1.55;
}

.temperature-tooltip-row strong {
  justify-self: end;
  font-weight: 840;
}

.temperature-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.temperature-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.temperature-legend-mark {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.temperature-legend-item.laser {
  color: #e5b452;
}

.temperature-legend-item.shell {
  color: #65d1df;
}

.temperature-legend-item.limit {
  color: #ffb8b2;
}

.temperature-history-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  border: 1px dashed var(--line-bright);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.temperature-history-state.error {
  border-color: rgba(214, 75, 63, 0.62);
  color: #ffb8b2;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .brand-block {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .status-cell:first-child {
    border-left: 0;
  }

  .primary {
    min-height: 46px;
    border-top: 1px solid rgba(22, 163, 184, 0.38);
    border-left: 0;
  }

  .measurement-panel {
    grid-template-columns: 1fr;
  }

  .measurement-head {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .measurement-gauge {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .measurement-cell:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .measurement-cell:nth-child(5) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 980px) {
  .camera-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .camera-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 10px 10px 18px;
  }

  .brand-block {
    align-items: flex-start;
  }

  .status-rail,
  .run-strip,
  .camera-foot,
  .measurement-gauge,
  .measurement-track {
    grid-template-columns: 1fr;
  }

  .status-cell,
  .run-strip div,
  .camera-foot > div,
  .measurement-cell,
  .measurement-cell:nth-child(4),
  .measurement-cell:nth-child(5) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .status-cell:first-child,
  .run-strip div:first-child,
  .camera-foot > div:first-child,
  .measurement-cell:first-child {
    border-top: 0;
  }

  .measurement-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .measurement-cell {
    min-height: 78px;
  }

  .measurement-track {
    gap: 10px;
  }

  .measurement-track-mark:last-child {
    justify-items: start;
    text-align: left;
  }

  .camera-card {
    grid-template-rows: auto minmax(320px, 48vh) auto;
  }

  .temperature-modal {
    padding: 10px;
  }

  .temperature-dialog {
    max-height: calc(100vh - 20px);
  }

  .temperature-chart {
    height: 300px;
  }

  .temperature-history-summary {
    grid-template-columns: 1fr;
  }

  .temperature-history-summary > .temperature-summary-cell,
  .temperature-history-summary > .temperature-summary-cell:first-child {
    grid-template-columns: minmax(0, 1fr);
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .temperature-history-summary > .temperature-summary-cell:first-child {
    border-top: 0;
  }

  .temperature-summary-peak {
    justify-items: start;
    min-width: 0;
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid rgba(217, 154, 43, 0.24);
    border-left: 0;
    text-align: left;
  }

  .media-tabs-top {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .media-tab-list {
    width: 100%;
  }

  .media-tab {
    flex: 1 1 0;
  }

  .media-tab-actions .artifact-links {
    justify-content: flex-start;
  }
}
