/* Generated from src/styles.css. */
@font-face {
  font-family: Measure;
  src: url("assets/fonts/BarlowSemiCondensed-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Measure;
  src: url("assets/fonts/BarlowSemiCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
:root {
  --paper: #fafbfd;
  --ink: #18222e;
  --muted: #75818e;
  --rule: #dfe5ec;
  --blue: #245dde;
  --orange: #c76635;
  --view: #171a20;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  color: inherit;
  background: none;
}
@media (hover: hover) and (pointer: fine) {
  button:hover,
  a:hover {
    color: var(--blue);
  }
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
.skip,
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  clip: auto;
  width: auto;
  height: auto;
  z-index: 20;
  padding: 10px;
  background: var(--theme-surface, #fff);
}
.app-header {
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 36px;
  gap: 54px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.wordmark {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 1px;
}
.app-header nav {
  display: flex;
  gap: 30px;
  height: 100%;
}
.app-header nav a {
  display: flex;
  align-items: center;
  position: relative;
  font-size: 13px;
  color: var(--theme-secondary, #7a8695);
  padding: 0 3px;
}
.app-header nav a.active {
  color: var(--blue);
  font-weight: 600;
}
.app-header nav a.active:after {
  content: "";
  height: 3px;
  background: var(--blue);
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}
.header-end {
  margin-left: auto;
  display: flex;
  gap: 16px;
  align-items: center;
}
.demo-label {
  font-size: 11px;
  color: var(--theme-secondary, #8b95a1);
}
.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover {
    background: var(--theme-surface-active, #ebf0f8);
  }
}

.icon-button svg {
  width: 18px;
  height: 18px;
  display: block;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 30px 36px 40px;
}
.data-number {
  font-family: Measure, sans-serif;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.4px;
}
.data-number .unit {
  font-family: inherit;
  font-size: 0.45em;
  margin-left: 3px;
  color: var(--muted);
  letter-spacing: 0;
}
.muted {
  color: var(--muted);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 23px;
}
.back-link svg {
  width: 15px;
  height: 15px;
}
.session-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.session-title {
  display: flex;
  align-items: baseline;
  gap: 17px;
}
.session-title h1 {
  font-size: 23px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.5px;
}
.session-title span {
  font-size: 12px;
  color: var(--muted);
}
.session-summary {
  display: flex;
  align-items: center;
  gap: 23px;
}
.summary-item {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.summary-item b {
  font-size: 29px;
  font-weight: 500;
}
.summary-item small {
  font-size: 11px;
  color: var(--muted);
}
.summary-divider {
  height: 25px;
  width: 1px;
  background: var(--rule);
}
.record-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(350px, 1fr);
  gap: 36px;
}
.trend-panel,
.arrow-panel {
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 46px;
  border-top: 1px solid var(--rule);
  gap: 14px;
}
.panel-heading h2 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  color: var(--muted);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend .legend-line {
  width: 15px;
  border-top: 1.5px dashed var(--theme-accent-blue, #7197e5);
}
.legend .legend-circle {
  width: 5px;
  height: 5px;
  border: 1px solid #a4afb9;
  border-radius: 100%;
}
.mini-chart {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  height: 171px;
  align-items: center;
  border-bottom: 1px solid var(--theme-rule, #edf0f4);
}
.chart-readout {
  align-self: center;
}
.metric-select {
  max-width: 109px;
  border: 0;
  padding: 0 15px 0 0;
  background: transparent;
  color: var(--theme-secondary, #626f80);
  font-size: 12px;
  cursor: pointer;
}
.metric-value {
  font-size: 39px;
  line-height: 1.2;
  display: block;
  margin-top: 11px;
  color: var(--ink);
}
.chart-readout .reading-label {
  font-size: 10px;
  display: block;
  color: var(--theme-muted, #8d98a7);
  margin-top: 5px;
}
.chart-svg {
  width: 100%;
  height: 160px;
  overflow: visible;
}
.chart-svg text {
  font-family: Measure, sans-serif;
  font-size: 13px;
  fill: var(--theme-secondary, #8995a5);
  font-variant-numeric: tabular-nums;
}
.chart-svg .hit {
  cursor: pointer;
}
.chart-svg .hit:focus,
.chart-svg .hit:focus-visible,
.chart-svg .hit:active {
  outline: none;
  stroke: none;
  fill: transparent;
}
.axis-caption {
  font-size: 10px;
  color: var(--theme-secondary, #8b96a4);
  margin-top: 10px;
  text-align: right;
}
.arrow-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.arrow-nav span {
  font-family: Measure, sans-serif;
  font-size: 15px;
  color: var(--theme-secondary, #748195);
  min-width: 44px;
  text-align: center;
}
.replay-view {
  position: relative;
  background: var(--theme-surface-active, #eff3f8);
  height: 259px;
  overflow: hidden;
  margin: 7px 0 0;
}
.replay-view .pose-svg {
  width: 100%;
  height: 100%;
}
.replay-label {
  position: absolute;
  left: 16px;
  top: 13px;
  font-size: 10px;
  color: var(--theme-muted, #8d98a7);
}
.replay-phase {
  position: absolute;
  right: 16px;
  top: 13px;
  font-size: 11px;
  font-weight: 550;
  color: var(--theme-text, #40546e);
}
.seek-wrapper {
  position: relative;
  margin: 17px 2px 7px;
}
.seek {
  display: block;
  width: 100%;
  height: 4px;
  accent-color: var(--blue);
  cursor: pointer;
}
.event-mark {
  position: absolute;
  top: -3px;
  height: 10px;
  border-left: 2px solid var(--theme-accent-blue, #245dde);
  pointer-events: none;
}
.event-mark.release {
  border-color: var(--orange);
}
.playback-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}
.playback-tools .icon-button {
  width: 30px;
  height: 32px;
}
.playback-tools .icon-button svg {
  width: 15px;
  height: 15px;
}
.event-jump {
  font-size: 10px;
  padding: 8px;
  color: var(--theme-secondary, #63768e);
}
.event-jump.anchor {
  color: var(--blue);
}
.event-jump.release {
  color: var(--orange);
}
.playback-time {
  font-family: Measure, sans-serif;
  font-size: 14px;
  color: var(--theme-muted, #8a97a8);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.shot-details {
  margin-top: 22px;
  border-top: 1px solid var(--rule);
}
.review-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
}
.text-button {
  font-size: 11px;
  color: var(--theme-secondary, #718095);
  padding: 5px 0;
}
@media (hover: hover) and (pointer: fine) {
  .text-button:hover {
    color: var(--blue);
  }
}

.exclude-button {
  display: flex;
  align-items: center;
  gap: 5px;
}
.exclude-button svg {
  width: 13px;
  height: 13px;
}
.details-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  margin-top: 15px;
}
.details-table th,
.details-table td {
  padding: 9px 4px;
  text-align: right;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.details-table th:first-child,
.details-table td:first-child {
  text-align: left;
}
.details-table td:not(:first-child) {
  font-family: Measure, sans-serif;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.details-table th {
  color: var(--muted);
}
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}
.list-heading h1 {
  font-size: 23px;
  margin: 0;
}
.list-tools {
  display: flex;
  gap: 15px;
  align-items: center;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--rule);
  padding: 7px 0;
}
.search-wrap svg {
  width: 15px;
  height: 15px;
  color: var(--theme-muted, #8a97a8);
}
.search-wrap input {
  width: 155px;
  border: 0;
  background: transparent;
  font-size: 12px;
  outline-offset: 7px;
}
.record-list-header,
.record-row {
  display: grid;
  grid-template-columns: 1.4fr 0.65fr 0.8fr 1.3fr 30px;
  gap: 25px;
  align-items: center;
}
.record-list-header {
  border-bottom: 1px solid var(--rule);
  padding: 0 0 13px;
  font-size: 11px;
  color: var(--theme-muted, #8a97a8);
}
.record-row {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}
@media (hover: hover) and (pointer: fine) {
  .record-row:hover {
    background: var(--theme-surface-active, #f0f4fa);
    color: inherit;
  }
}

.record-row .list-date {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.record-row .list-date b {
  font-size: 26px;
  font-weight: 500;
}
.record-row small {
  font-size: 11px;
  color: var(--theme-muted, #8a97a8);
}
.record-row .list-number {
  font-size: 28px;
}
.record-row .list-spark {
  width: 100%;
  height: 40px;
}
.record-row > svg {
  width: 17px;
  height: 17px;
}
.empty {
  font-size: 13px;
  color: var(--muted);
  padding: 48px 0;
}
.capture-main {
  padding: 24px 36px 30px;
  max-width: 1480px;
}
.capture-view {
  position: relative;
  background: var(--view);
  height: calc(100vh - 133px);
  min-height: 520px;
  max-height: 860px;
  overflow: hidden;
  border-radius: 5px;
  color: #fff;
}
.capture-pose {
  position: absolute;
  inset: 12% 8% 24%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.capture-pose svg {
  height: 100%;
  width: 100%;
}
.capture-view:after {
  content: "";
  position: absolute;
  inset: 55% 0 0;
  pointer-events: none;
  background: linear-gradient(transparent, #101319e8);
}
.capture-top {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 28px;
  top: 27px;
  display: flex;
  align-items: start;
  justify-content: space-between;
}
.capture-phase {
  display: flex;
  align-items: center;
  gap: 16px;
}
.capture-phase h1 {
  font-size: 23px;
  font-weight: 550;
  margin: 0;
}
.capture-clock {
  font-size: 24px;
  color: var(--theme-muted, #9aa5b6);
}
.stage-progress {
  display: flex;
  gap: 4px;
  margin-top: 11px;
}
.stage-progress span {
  width: 24px;
  height: 3px;
  background: #3c4655;
}
.stage-progress span.current {
  background: var(--theme-surface-active, #77a0ff);
}
.capture-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.capture-count b {
  font-size: 55px;
  line-height: 1;
}
.capture-count span {
  font-size: 11px;
  color: var(--theme-muted, #8e9aab);
}
.capture-unconnected {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 15px;
  color: var(--theme-muted, #8b96a8);
  font-size: 12px;
}
.capture-unconnected svg {
  width: 32px;
  height: 32px;
  color: var(--theme-muted, #aeb8c6);
}
.hud-readings {
  position: absolute;
  z-index: 1;
  bottom: 104px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: end;
}
.hud-reading {
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 8px 0 9px;
  min-width: 105px;
  text-align: left;
  border-bottom: 2px solid transparent;
}
.hud-reading.active {
  border-bottom-color: var(--theme-rule, #77a0ff);
}
@media (hover: hover) and (pointer: fine) {
  .hud-reading:hover {
    color: inherit;
  }
}

.hud-reading .metric-label {
  font-size: 11px;
  color: var(--theme-muted, #aab6c7);
  cursor: pointer;
}
.hud-reading .data-number {
  font-size: 43px;
  line-height: 1.1;
  margin-top: 10px;
  color: #f3f6fb;
}
.hud-reading .unit {
  color: var(--theme-muted, #b3bfd0);
}
.hud-reading .last-six {
  font:
    12px Measure,
    sans-serif;
  color: var(--theme-muted, #8e9bad);
  letter-spacing: 0;
  margin-left: 7px;
}
.hud-stability {
  display: flex;
  align-items: end;
  gap: 17px;
}
.hud-stability svg {
  width: 86px;
  height: 37px;
  margin-bottom: 4px;
}
.capture-bottom {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ffffff12;
  padding: 19px 28px;
  background: #12161cb0;
  min-height: 76px;
  gap: 18px;
}
.capture-status {
  font-size: 10px;
  color: var(--theme-muted, #92a0b5);
  display: flex;
  gap: 6px;
  align-items: center;
}
.capture-status:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #738499;
}
.capture-controls {
  display: flex;
  gap: 14px;
  align-items: center;
}
.camera-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--theme-muted, #aebdd1);
  font-size: 12px;
  padding: 10px 0;
}
.camera-toggle svg {
  width: 16px;
  height: 16px;
}
.capture-action {
  border: 1px solid #ffffff30;
  background: var(--theme-surface, #fff);
  color: var(--theme-accent-blue, #1b2533);
  border-radius: 30px;
  padding: 11px 23px;
  font-size: 12px;
  font-weight: 550;
  display: flex;
  align-items: center;
  gap: 9px;
}
@media (hover: hover) and (pointer: fine) {
  .capture-action:hover {
    background: var(--theme-surface-active, #eaf0ff);
    color: var(--theme-accent-blue, #245dde);
  }
}

.capture-action .record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cf4654;
}
.capture-action.running {
  background: #cf4654;
  color: #fff;
  border-color: var(--theme-accent-red, #cf4654);
}
.capture-action.running .record-dot {
  background: var(--theme-surface, #fff);
  border-radius: 1px;
}
.capture-settings {
  font-size: 10px;
  color: var(--theme-muted, #92a0b5);
  white-space: nowrap;
}
.capture-annotation {
  font:
    20px Measure,
    sans-serif;
  fill: #8bb0ff;
}
.pose-svg {
  display: block;
}
.capture-demo-label {
  position: absolute;
  bottom: 185px;
  left: 28px;
  z-index: 1;
  color: var(--theme-secondary, #687990);
  font-size: 10px;
}
dialog {
  border: 0;
  border-radius: 10px;
  padding: 25px;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 16px 70px #0002;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #15233455;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dialog-head h2 {
  font-size: 17px;
  margin: 0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}
.setting-row select {
  font-size: 12px;
  border: 1px solid var(--rule);
  padding: 6px;
  background: var(--theme-surface, #fff);
  color: var(--ink);
  border-radius: 4px;
}
.setting-row input {
  accent-color: var(--blue);
  width: 17px;
  height: 17px;
}
.dialog-note {
  font-size: 11px;
  color: var(--muted);
  margin: 20px 0 0;
}
#tooltip {
  display: none;
  position: fixed;
  z-index: 8;
  pointer-events: none;
  background: #25354e;
  color: #fff;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 4px;
  box-shadow: 0 3px 12px #0001;
}
.hidden {
  display: none !important;
}
@media (min-width: 1001px) and (max-height: 850px) {
  main {
    padding-top: 23px;
  }
  .session-heading {
    margin-bottom: 19px;
  }
  .back-link {
    margin-bottom: 19px;
  }
  .mini-chart {
    height: 150px;
  }
  .chart-svg {
    height: 142px;
  }
  .replay-view {
    height: 225px;
  }
}
@media (max-width: 1000px) {
  .record-workspace {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .arrow-panel {
    max-width: 560px;
  }
  .session-heading {
    align-items: start;
  }
  .session-summary {
    gap: 15px;
  }
  .session-title {
    flex-direction: column;
    gap: 7px;
  }
  .summary-item {
    gap: 5px;
  }
  .summary-item b {
    font-size: 25px;
  }
  .mini-chart {
    height: 155px;
  }
  .chart-svg {
    height: 146px;
  }
  .capture-view {
    height: calc(100vh - 127px);
  }
  .hud-readings {
    gap: 17px;
  }
  .hud-stability svg {
    width: 61px;
  }
}
@media (max-width: 650px) {
  .app-header {
    height: 61px;
    padding: 0 18px;
    gap: 33px;
  }
  .app-header nav {
    gap: 25px;
  }
  .header-end {
    gap: 9px;
  }
  .wordmark {
    font-size: 16px;
  }
  main {
    padding: 24px 18px 35px;
  }
  .session-heading {
    display: block;
    margin-bottom: 22px;
  }
  .session-title {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
  }
  .session-title h1 {
    font-size: 21px;
  }
  .session-summary {
    gap: 16px;
  }
  .summary-item b {
    font-size: 27px;
  }
  .summary-item small {
    font-size: 10px;
  }
  .summary-divider {
    height: 19px;
  }
  .summary-item.excluded {
    display: none;
  }
  .mini-chart {
    grid-template-columns: 94px minmax(0, 1fr);
    height: 151px;
  }
  .chart-svg {
    height: 144px;
  }
  .metric-select {
    font-size: 11px;
    max-width: 92px;
  }
  .metric-value {
    font-size: 34px;
  }
  .legend {
    gap: 9px;
    font-size: 9px;
  }
  .arrow-panel {
    display: block;
  }
  .replay-view {
    height: 263px;
  }
  .list-tools {
    gap: 7px;
  }
  .search-wrap input {
    width: 110px;
  }
  .record-list-header,
  .record-row {
    grid-template-columns: 1.3fr 0.65fr 0.65fr 17px;
    gap: 12px;
  }
  .record-list-header .spark-label,
  .record-row .list-spark {
    display: none;
  }
  .record-row .list-date {
    flex-direction: column;
    gap: 3px;
    align-items: start;
  }
  .record-row .list-date b {
    font-size: 23px;
  }
  .capture-main {
    padding: 15px 12px;
  }
  .capture-view {
    height: calc(100svh - 91px);
    min-height: 550px;
    border-radius: 4px;
  }
  .capture-top {
    left: 19px;
    right: 19px;
    top: 23px;
  }
  .capture-phase {
    gap: 12px;
  }
  .capture-phase h1 {
    font-size: 21px;
  }
  .capture-clock {
    font-size: 22px;
  }
  .capture-count b {
    font-size: 46px;
  }
  .capture-pose {
    inset: 18% 3% 34%;
  }
  .hud-readings {
    left: 20px;
    right: 20px;
    bottom: 122px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 31px;
  }
  .hud-reading {
    padding: 5px 0 7px;
  }
  .hud-reading .data-number {
    font-size: 34px;
    margin-top: 7px;
  }
  .hud-stability {
    gap: 9px;
  }
  .hud-stability svg {
    width: 65px;
    height: 30px;
  }
  .capture-bottom {
    padding: 13px 18px 19px;
    flex-wrap: wrap;
    gap: 9px;
  }
  .capture-controls {
    order: 0;
    width: 100%;
    justify-content: center;
    gap: 28px;
  }
  .capture-status,
  .capture-settings {
    order: 1;
    font-size: 9px;
  }
  .capture-demo-label {
    left: 20px;
    bottom: 289px;
  }
  .record-workspace {
    gap: 23px;
  }
  .panel-heading {
    height: 42px;
  }
  .back-link {
    margin-bottom: 19px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
/* Measurement curves: raw observations, rolling center and statistical envelope. */
.plot-grid {
  stroke: var(--theme-rule, #e4eaf2);
  stroke-width: 0.8;
  stroke-dasharray: 2 5;
}
.plot-zero {
  stroke: var(--theme-rule, #aebed2);
  stroke-width: 0.9;
}
.raw-curve {
  fill: none;
  stroke: var(--theme-accent-blue, #386cda);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.mean-curve {
  fill: none;
  stroke: var(--theme-muted, #64758d);
  stroke-width: 1.2;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.band-edge {
  fill: none;
  stroke: var(--theme-accent-blue, #759bec);
  stroke-opacity: 0.5;
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}
.plot-cursor {
  stroke: var(--theme-accent-blue, #245dde);
  stroke-opacity: 0.45;
  stroke-width: 1;
}
.plot-point {
  fill: #fafbfd;
  stroke: var(--theme-accent-blue, #386cda);
  stroke-width: 1.5;
}
.plot-point.selected {
  fill: var(--theme-accent-blue, #245dde);
  stroke: var(--theme-accent-blue, #fafbfd);
  stroke-width: 1.7;
}
.plot-point.excluded {
  fill: #fafbfd;
  stroke: var(--theme-muted, #9eaab9);
}
.chart-svg text.selected-tick {
  fill: var(--theme-accent-blue, #245dde);
  font-weight: 600;
}
.legend-raw {
  width: 15px;
  border-top: 2px solid var(--theme-accent-blue, #386cda);
}
.legend .legend-line {
  border-top-color: #64758d;
}
.metric-select {
  appearance: none;
  background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"%3E%3Cpath d="m2 4 3 3 3-3" stroke="%2375818e" fill="none" stroke-linecap="round"/%3E%3C/svg%3E')
    right center/9px no-repeat;
  padding-right: 13px;
}
.details-table .metric-group th {
  text-align: left;
  font-size: 10px;
  color: var(--theme-secondary, #6a7b91);
  letter-spacing: 0.5px;
  padding-top: 19px;
  border-bottom-color: var(--theme-rule, #cfd9e7);
}
.details-table td:first-child {
  color: var(--theme-secondary, #526174);
}
.details-table td:not(:first-child) {
  color: var(--theme-accent-blue, #233c5c);
}
.shot-details:has(.details-table:not(.hidden)) {
  max-height: 560px;
  overflow: auto;
  scrollbar-width: thin;
}
.mini-chart {
  height: 178px;
}
.chart-svg {
  height: 166px;
}
.metric-value {
  letter-spacing: -0.7px;
}
.icon-button {
  border-radius: 5px;
}
.icon-button svg {
  stroke-width: 1.65;
}
.legend {
  gap: 10px;
}
.panel-heading {
  gap: 8px;
}
@media (min-width: 1001px) and (max-height: 850px) {
  .mini-chart {
    height: 158px;
  }
  .chart-svg {
    height: 152px;
  }
}
@media (max-width: 650px) {
  .legend {
    gap: 6px;
  }
  .band-toggle {
    font-size: 9px;
    padding: 4px;
  }
  .legend-raw,
  .legend .legend-line {
    width: 11px;
  }
  .mini-chart {
    height: 164px;
  }
  .chart-svg {
    height: 155px;
  }
  .chart-readout .reading-label {
    font-size: 9px;
  }
}
/* One trend plot, directly accessible grouped metric tags. */
:root {
  --anchor: #c87537;
  --release: #31966a;
}
.metric-categories {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 17px 0 19px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 14px;
}
.metric-category {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}
.metric-category h2 {
  font-size: 11px;
  font-weight: 500;
  color: var(--theme-muted, #929dac);
  margin: 0;
  line-height: 29px;
}
.metric-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.metric-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
  padding: 6px 9px;
  min-height: 29px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--theme-secondary, #66768c);
  background: transparent;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .metric-tag:hover {
    color: var(--theme-accent-blue, #345d9a);
    background: var(--theme-surface-active, #edf2fa);
  }
}

.metric-tag.active {
  color: var(--theme-accent-blue, #2557a8);
  border-color: var(--theme-rule, #d4e1f8);
  background: var(--theme-surface-active, #eaf1fd);
  font-weight: 500;
}
.trend-panel > .panel-heading {
  border-top: 0;
  height: 45px;
}
.mini-chart {
  height: 346px;
  grid-template-columns: 112px minmax(0, 1fr);
  border-bottom: 0;
}
.chart-svg {
  height: 306px;
}
.chart-readout {
  align-self: center;
}
.metric-value {
  font-size: 43px;
}
.metric-name {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  color: var(--theme-secondary, #68788d);
}
.legend-band {
  display: inline-block;
  width: 15px;
  height: 8px;
  border-top: 1px solid var(--theme-rule, #87a6e5);
  border-bottom: 1px solid var(--theme-rule, #87a6e5);
  background: #527df126;
}
.record-workspace {
  gap: 36px;
}
.axis-caption {
  margin-top: 0;
}
.replay-view {
  height: 262px;
}
.event-mark {
  top: -2px;
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--anchor);
  transform: translateX(-50%);
  box-shadow: 0 0 0 2px var(--paper);
}
.event-mark.release {
  background: var(--release);
  border: 0;
}
.event-jump.anchor {
  color: var(--anchor);
}
.event-jump.release {
  color: var(--release);
}
@media (hover: hover) and (pointer: fine) {
  .event-jump.anchor:hover {
    background: #c8753710;
    color: var(--theme-accent-orange, #b2642b);
  }
}

@media (hover: hover) and (pointer: fine) {
  .event-jump.release:hover {
    background: #31966a10;
    color: var(--theme-accent-green, #277c56);
  }
}

.replay-phase.anchor {
  color: var(--anchor);
}
.replay-phase.release {
  color: var(--release);
}
.capture-phase .stage-anchor {
  color: var(--theme-accent-orange, #eda368);
}
.capture-phase .stage-release {
  color: var(--theme-accent-green, #70d0a1);
}
.stage-progress span.current.anchor {
  background: #eda368;
}
.stage-progress span.current.release {
  background: #70d0a1;
}
@media (min-width: 1001px) and (max-height: 850px) {
  .mini-chart {
    height: 322px;
  }
  .chart-svg {
    height: 288px;
  }
  .replay-view {
    height: 235px;
  }
}
@media (max-width: 1000px) {
  .record-workspace {
    gap: 24px;
  }
  .replay-view {
    height: 260px;
  }
  .mini-chart {
    height: 330px;
  }
  .chart-svg {
    height: 294px;
  }
  .metric-categories {
    gap: 8px;
    padding: 15px 0 16px;
  }
  .metric-tag {
    padding: 5px 8px;
  }
}
@media (max-width: 650px) {
  .metric-category {
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 6px;
  }
  .metric-tags {
    gap: 3px 4px;
  }
  .metric-tag {
    font-size: 10px;
    min-height: 28px;
    padding: 5px 7px;
  }
  .metric-category h2 {
    font-size: 10px;
    line-height: 28px;
  }
  .metric-categories {
    padding: 13px 0 15px;
    gap: 7px;
  }
  .mini-chart {
    height: 312px;
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .chart-svg {
    height: 282px;
  }
  .metric-name {
    font-size: 11px;
  }
  .metric-value {
    font-size: 34px;
  }
  .legend {
    gap: 7px;
    font-size: 9px;
  }
  .legend-band {
    width: 12px;
  }
  .replay-view {
    height: 255px;
  }
}
.event-jump {
  margin-left: 3px;
  border-radius: 4px;
  padding: 6px 9px;
  border: 1px solid transparent;
}
.event-jump.anchor {
  background: var(--theme-surface-active, #fff0e3);
  border-color: var(--theme-rule, #efd2be);
  color: var(--theme-accent-orange, #b56126);
}
.event-jump.release {
  background: var(--theme-surface-active, #e8f4ed);
  border-color: var(--theme-rule, #cde4d7);
  color: var(--theme-accent-green, #287e56);
}
@media (hover: hover) and (pointer: fine) {
  .event-jump.anchor:hover {
    background: var(--theme-surface-active, #fbe3cf);
  }
}

@media (hover: hover) and (pointer: fine) {
  .event-jump.release:hover {
    background: var(--theme-surface-active, #d7eddf);
  }
}

.replay-phase.anchor {
  color: var(--theme-accent-orange, #b56126);
}
.replay-phase.release {
  color: var(--theme-accent-green, #287e56);
}
/* Each metric has an anatomical measurement diagram beside its value. */
:root {
  --raw: #426add;
  --mean: #208b7b;
  --spread: #9478cb;
  --excluded: #b58a51;
}
.mini-chart {
  height: 384px;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 0;
}
.chart-svg {
  height: 326px;
}
.chart-readout {
  align-self: start;
  padding-top: 17px;
}
.metric-anatomy {
  margin: 10px 0 0;
  max-width: 151px;
}
.anatomy-svg {
  display: block;
  width: 100%;
  height: 179px;
  overflow: visible;
}
.metric-anatomy figcaption {
  font-size: 10px;
  color: var(--theme-secondary, #63778d);
  line-height: 1.55;
  padding: 2px 0 0;
  max-width: 147px;
}
.anatomy-schematic {
  display: block;
  font-size: 9px;
  color: var(--theme-muted, #9ca8b8);
  margin-bottom: 4px;
}
.anatomy-body {
  stroke: var(--theme-rule, #c2ccd7);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.anatomy-joint {
  fill: #bec9d6;
}
.anatomy-highlight {
  fill: none;
  stroke: var(--raw);
  stroke-width: 3;
  stroke-linecap: round;
}
.anatomy-distance {
  fill: none;
  stroke: var(--raw);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 4 3;
}
.anatomy-measure {
  fill: none;
  stroke: var(--raw);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.anatomy-reference {
  fill: none;
  stroke: var(--theme-muted, #92a5bc);
  stroke-width: 1;
  stroke-dasharray: 1.5 2;
}
.anatomy-reference-width {
  fill: none;
  stroke: var(--mean);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.anatomy-sector {
  fill: #426add18;
  stroke: var(--raw);
  stroke-width: 1.2;
}
.anatomy-arrow {
  fill: none;
  stroke: var(--raw);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.anatomy-halo {
  fill: #426add15;
}
.anatomy-active-joint {
  fill: var(--raw);
  stroke: var(--paper);
  stroke-width: 1.1;
}
.anatomy-history {
  fill: #426add80;
}
.anatomy-label {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  fill: var(--theme-accent-blue, #4b70b1);
}
.plot-background {
  fill: var(--theme-surface, #f2f5f9);
}
.plot-grid {
  stroke: var(--theme-rule, #dce4ed);
  stroke-width: 0.8;
  stroke-dasharray: none;
  vector-effect: non-scaling-stroke;
}
.vertical-grid {
  stroke: var(--theme-rule, #e0e7ef);
  stroke-width: 0.8;
}
.raw-curve {
  stroke: var(--raw);
  stroke-width: 2.2;
}
.mean-curve {
  stroke: var(--mean);
  stroke-width: 1.65;
  stroke-dasharray: 5 5;
}
.band-edge {
  stroke: var(--spread);
  stroke-opacity: 0.58;
  stroke-width: 0.8;
}
.plot-point {
  stroke: var(--raw);
  fill: #f8faff;
}
.plot-point.selected {
  fill: var(--raw);
  stroke: #fff;
}
.plot-point.excluded {
  stroke: var(--excluded);
  fill: #fffaf2;
  stroke-width: 1.6;
}
.legend .legend-raw {
  border-top-color: var(--raw);
}
.legend .legend-line {
  border-top-color: var(--mean);
  border-top-width: 1.7px;
}
.legend .legend-band {
  border-color: var(--spread);
  background: #9478cb26;
}
.legend .legend-circle {
  border-color: var(--excluded);
  background: var(--theme-surface-active, #fff3e0);
  width: 6px;
  height: 6px;
}
.legend {
  gap: 12px;
}
@media (min-width: 1001px) and (max-height: 850px) {
  .mini-chart {
    height: 367px;
  }
  .chart-svg {
    height: 316px;
  }
  .anatomy-svg {
    height: 171px;
  }
}
@media (max-width: 1000px) {
  .mini-chart {
    height: 375px;
  }
  .chart-svg {
    height: 316px;
  }
  .anatomy-svg {
    height: 172px;
  }
}
@media (max-width: 650px) {
  .mini-chart {
    height: 352px;
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .chart-svg {
    height: 298px;
  }
  .chart-readout {
    padding-top: 15px;
  }
  .metric-anatomy {
    max-width: 120px;
    margin-top: 11px;
  }
  .anatomy-svg {
    height: 153px;
  }
  .metric-anatomy figcaption {
    font-size: 9px;
    max-width: 115px;
  }
  .metric-value {
    font-size: 34px;
  }
  .legend {
    gap: 7px;
    font-size: 9px;
  }
  .trend-panel > .panel-heading {
    height: 43px;
  }
}
.legend span:nth-child(1) {
  color: var(--raw);
}
.legend span:nth-child(2) {
  color: var(--mean);
}
.legend span:nth-child(3) {
  color: var(--theme-accent-blue, #8163b3);
}
.legend span:nth-child(4) {
  color: var(--theme-accent-orange, #9e7542);
}
.anatomy-body {
  stroke: var(--theme-muted, #aab9ca);
}
.anatomy-joint {
  fill: #a7b8cb;
}
.anatomy-distance {
  stroke-width: 1.25;
  stroke-dasharray: 2 2;
}
/* Aligned measurement and replay windows, with undistorted circular marks. */
:root {
  --window-height: 360px;
  --window-footer: 65px;
  --excluded: #8d98a7;
  --window-fill: #f2f5f9;
}
.record-workspace {
  align-items: start;
}
.record-workspace .panel-heading {
  height: 44px;
  min-height: 44px;
  border-top: 1px solid var(--rule);
  margin: 0;
}
.trend-panel > .panel-heading {
  border-top: 1px solid var(--rule);
}
.mini-chart {
  height: var(--window-height);
  align-items: stretch;
  grid-template-columns: 160px minmax(0, 1fr);
  margin: 0;
  padding: 0;
}
.chart-area {
  height: var(--window-height);
  width: 100%;
  min-width: 0;
  background: var(--window-fill);
  overflow: hidden;
}
.chart-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-readout {
  padding-top: 12px;
}
.replay-view {
  height: var(--window-height);
  margin: 0;
  background: var(--window-fill);
}
.arrow-panel {
  max-width: none;
  width: 100%;
}
.axis-caption {
  height: var(--window-footer);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--rule);
}
.replay-controls {
  height: var(--window-footer);
  display: grid;
  grid-template-rows: 30px 34px;
  border-bottom: 1px solid var(--rule);
}
.seek-wrapper {
  height: 30px;
  margin: 0;
  padding: 20px 0 0;
  position: relative;
}
.seek {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--blue) 0%,
    var(--blue) var(--progress),
    var(--theme-surface, #d4dce7) var(--progress),
    var(--theme-surface, #d4dce7) 100%
  );
  cursor: pointer;
  outline-offset: 6px;
}
.seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px #245dde22;
}
.seek::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px #245dde22;
}
.event-mark,
.event-mark.release {
  top: 8px;
  width: 9px;
  height: 7px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: translateX(-50%);
  z-index: 1;
}
.event-mark {
  background: var(--anchor);
}
.event-mark.release {
  background: var(--release);
}
.playback-tools {
  height: 34px;
  gap: 4px;
}
.shot-details {
  margin-top: 0;
  border-top: 0;
}
.data-number:has(> .angle-unit) {
  display: inline-flex;
  align-items: baseline;
}
.data-number .angle-unit {
  position: static;
  align-self: flex-start;
  vertical-align: baseline;
  font-size: 0.48em;
  line-height: 1;
  margin-left: 2px;
  margin-top: 0.28em;
  color: var(--muted);
  font-weight: 500;
}
.metric-value {
  line-height: 1.12;
  margin-top: 9px;
}
.hud-reading .angle-unit {
  color: var(--theme-muted, #b3bfd0);
}
.plot-point {
  vector-effect: non-scaling-stroke;
}
.plot-point.excluded {
  stroke: var(--excluded);
  fill: var(--theme-surface, #f9fafc);
}
.legend .legend-circle {
  border-color: var(--excluded);
  background: var(--theme-surface, #f1f3f6);
}
.legend span:nth-child(4) {
  color: var(--excluded);
}
@media (min-width: 1001px) and (max-height: 850px) {
  :root {
    --window-height: 336px;
  }
  .metric-anatomy {
    margin-top: 8px;
  }
  .anatomy-svg {
    height: 165px;
  }
}
@media (max-width: 1000px) {
  :root {
    --window-height: 336px;
  }
  .record-workspace {
    gap: 24px;
  }
  .mini-chart {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .anatomy-svg {
    height: 170px;
  }
}
@media (max-width: 650px) {
  :root {
    --window-height: 320px;
  }
  .mini-chart {
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .chart-readout {
    padding-top: 12px;
  }
  .metric-anatomy {
    margin-top: 9px;
  }
  .anatomy-svg {
    height: 146px;
  }
  .metric-anatomy figcaption {
    font-size: 9px;
  }
  .data-number .angle-unit {
    margin-top: 0.25em;
  }
  .record-workspace .panel-heading {
    height: 43px;
    min-height: 43px;
  }
}
/* Unified analysis hierarchy and one-line replay transport. */
:root {
  --window-footer: 64px;
}
.session-heading {
  margin-bottom: 22px;
}
.metric-categories {
  border-top: 0;
  border-bottom: 1px solid var(--rule);
  padding-top: 4px;
  padding-bottom: 18px;
  gap: 10px;
  margin-bottom: 8px;
}
.metric-category {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
}
.metric-category h2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--theme-text, #3b4b61);
  letter-spacing: 0.4px;
  line-height: 29px;
}
.record-workspace .panel-heading,
.trend-panel > .panel-heading {
  border-top: 0;
}
.axis-caption {
  border-bottom: 0;
}
.replay-controls {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 80px;
  gap: 8px;
  align-items: start;
  height: var(--window-footer);
  padding: 0;
  border: 0;
}
.playback-tools {
  height: 32px;
  margin-top: 24px;
  gap: 0;
}
.playback-tools .icon-button {
  width: 28px;
  height: 32px;
}
.seek-wrapper {
  height: 64px;
  min-width: 0;
  padding: 38px 0 0;
  margin: 0;
}
.playback-time {
  display: block;
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 32px;
  text-align: right;
  white-space: nowrap;
}
.phase-marker {
  position: absolute;
  top: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 30px;
  padding: 0;
  transform: translateX(-50%);
  background: none;
  border: 0;
  border-radius: 0;
  z-index: 1;
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
  cursor: pointer;
}
.phase-marker.anchor {
  color: var(--theme-accent-orange, #b56126);
}
.phase-marker.release {
  color: var(--theme-accent-green, #287e56);
}
.phase-marker span {
  border-bottom: 1px solid transparent;
}
@media (hover: hover) and (pointer: fine) {
  .phase-marker:hover span {
    border-bottom-color: currentColor;
  }
}

.phase-marker .event-mark,
.phase-marker .event-mark.release {
  display: block;
  position: static;
  transform: none;
  flex-shrink: 0;
  width: 8px;
  height: 6px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.shot-details {
  width: 100%;
  margin-top: 14px;
  border-top: 1px solid var(--rule);
}
.shot-details:has(.details-table:not(.hidden)) {
  max-height: none;
  overflow: visible;
}
.review-actions {
  height: 51px;
  margin: 0;
  gap: 15px;
}
.details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  font-size: 12px;
  color: var(--theme-accent-blue, #394e6a);
  text-align: left;
}
@media (hover: hover) and (pointer: fine) {
  .details-toggle:hover {
    color: var(--blue);
  }
}

.details-toggle small {
  font-family: Measure, sans-serif;
  font-size: 14px;
  color: var(--theme-muted, #96a4b6);
  margin-left: 3px;
}
.details-chevron {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.details-toggle.expanded .details-chevron {
  transform: rotate(90deg);
}
.details-body {
  max-height: 430px;
  overflow: auto;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.details-table {
  margin: 0;
  font-size: 12px;
  table-layout: fixed;
}
.details-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--paper);
  font-size: 11px;
  padding: 12px 12px;
  border-bottom-color: var(--theme-rule, #d3dce7);
}
.details-table th:first-child,
.details-table td:first-child {
  width: 58%;
  padding-left: 21px;
  text-align: left;
}
.details-table th:not(:first-child),
.details-table td:not(:first-child) {
  width: 21%;
  padding-right: 12px;
  text-align: right;
}
.details-table thead th:nth-child(2) {
  color: var(--theme-accent-orange, #b56126);
}
.details-table thead th:nth-child(3) {
  color: var(--theme-accent-green, #287e56);
}
.details-table td {
  height: 39px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom-color: var(--theme-rule, #e9edf3);
}
.details-table tr.active-metric td {
  background: var(--theme-surface-active, #edf3fd);
  color: var(--theme-accent-blue, #315b9d);
}
.details-table tr.active-metric td:first-child {
  box-shadow: inset 2px 0 #426add;
}
.details-table .metric-group th {
  width: auto;
  padding: 18px 21px 10px;
  font-weight: 600;
  color: var(--theme-secondary, #6f829d);
}
.exclude-button {
  font-size: 11px;
  flex-shrink: 0;
}
@media (max-width: 1000px) {
  .record-workspace {
    gap: 18px;
  }
  .shot-details {
    margin-top: 10px;
  }
}
@media (max-width: 650px) {
  .metric-categories {
    padding-top: 0;
    padding-bottom: 16px;
    gap: 8px;
  }
  .metric-category {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 5px;
  }
  .metric-category h2 {
    font-size: 11px;
    font-weight: 600;
    line-height: 28px;
  }
  .replay-controls {
    grid-template-columns: 78px minmax(0, 1fr) 77px;
    gap: 6px;
  }
  .playback-tools .icon-button {
    width: 26px;
  }
  .phase-marker {
    font-size: 10px;
  }
  .details-toggle {
    font-size: 11px;
    gap: 7px;
  }
  .details-table {
    font-size: 11px;
  }
  .details-table th:first-child,
  .details-table td:first-child {
    width: 54%;
    padding-left: 8px;
  }
  .details-table th:not(:first-child),
  .details-table td:not(:first-child) {
    width: 23%;
    padding-right: 8px;
  }
  .details-table .metric-group th {
    padding-left: 8px;
  }
  .review-actions {
    height: 49px;
  }
  .exclude-button {
    font-size: 10px;
  }
  .details-body {
    max-height: 360px;
  }
}
@media (max-width: 1000px) {
  .axis-caption {
    height: 26px;
  }
  .record-workspace {
    gap: 16px;
  }
}
/* Functional camera, dialogs and list selection. */
#camera-video,
#camera-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#camera-video {
  transform: scaleX(-1);
}
#camera-overlay {
  pointer-events: none;
}
.capture-view.is-delay-buffering::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
#replay-canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.replay-label,
.replay-phase {
  z-index: 1;
  pointer-events: none;
}
.record-row {
  width: 100%;
  text-align: left;
}
.record-row.selected-record {
  background: var(--theme-surface-active, #eaf1fd);
}
.record-row > .list-spark {
  width: 100%;
  height: 40px;
}
.danger-text {
  color: var(--theme-accent-red, #ba4653);
}
.capture-status .text-button {
  color: #b8c5d7;
}
.capture-settings #capture-clock {
  margin-right: 10px;
}
.setting-meta {
  font:
    14px Measure,
    sans-serif;
  color: var(--muted);
}
.setting-links {
  border-bottom: 0;
}
.toast-root {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  display: grid;
  gap: 7px;
  max-width: calc(100vw - 32px);
}
.toast {
  background: #25354e;
  color: #fff;
  border-radius: 6px;
  padding: 11px 17px;
  font-size: 12px;
  box-shadow: 0 3px 16px #15233422;
}
.toast.error {
  background: #964f49;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #15233455;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  background: var(--paper);
  padding: 24px;
  border-radius: 10px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 16px 70px #0002;
}
.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal h2 {
  margin: 0;
  font-size: 17px;
}
.modal-close {
  font-size: 25px;
  color: var(--muted);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}
.button {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 8px 13px;
  font-size: 12px;
}
.button-danger {
  color: var(--theme-accent-red, #ba4653);
  border-color: var(--theme-rule, #e7b6bc);
}
.release-list {
  padding-left: 18px;
  line-height: 1.9;
  font-size: 12px;
  color: var(--theme-secondary, #61738b);
}
.subtle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.chart-readout .metric-value {
  max-width: 100%;
  overflow-wrap: anywhere;
}
dialog {
  max-height: calc(100svh - 32px);
  overflow: auto;
}
.capture-controls button:disabled {
  opacity: 0.35;
}
.phase-marker {
  pointer-events: auto;
}
.shot-details {
  scroll-margin-top: 20px;
}
/* Stable capture HUD over bright and dark camera backgrounds. */
.capture-top {
  inset: 0 0 auto;
  padding: 26px 28px 42px;
  background: linear-gradient(180deg, #07101beb 0%, #07101bb8 55%, #07101b00 100%);
  text-shadow: 0 1px 4px #0009;
  pointer-events: none;
}
.capture-clock {
  color: #edf3fc;
  min-width: 5ch;
  font-variant-numeric: tabular-nums;
}
.capture-count span {
  color: #d9e3f2;
}
.capture-top .stage-progress span {
  background: #8694a780;
}
.capture-top .stage-progress span.current {
  background: var(--theme-surface-active, #77a0ff);
}
.capture-top .stage-progress span.current.anchor {
  background: #ffd45a;
}
.capture-phase .stage-anchor {
  color: var(--theme-accent-orange, #ffd45a);
}
.capture-top .stage-progress span.current.release {
  background: #70d0a1;
}
.capture-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.capture-controls {
  justify-self: center;
  white-space: nowrap;
}
.capture-status {
  min-width: 0;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}
.capture-settings {
  justify-self: end;
  text-align: right;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
#camera-fps {
  display: inline-block;
  min-width: 3ch;
  text-align: right;
  font-family: Measure, sans-serif;
}
.search-wrap {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 7px 10px;
  gap: 7px;
}
.search-wrap input[type="date"] {
  width: 133px;
  min-width: 0;
  color: var(--theme-secondary, #53657c);
  font-size: 12px;
  color-scheme: light;
  background: none;
}
.anatomy-source {
  color: var(--theme-secondary, #7890ad);
}
.metric-anatomy .anatomy-body {
  stroke-width: 2;
}
.anatomy-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: var(--theme-muted, #8c99aa);
  font-size: 10px;
}
@media (max-width: 650px) {
  .capture-top {
    inset: 0 0 auto;
    padding: 22px 19px 36px;
  }
  .capture-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 13px 18px 19px;
  }
  .capture-controls {
    grid-column: 1/-1;
    grid-row: 1;
    order: 0;
    width: auto;
    gap: 23px;
  }
  .capture-status {
    grid-row: 2;
    order: 1;
  }
  .capture-settings {
    grid-row: 2;
    order: 1;
    justify-self: end;
  }
  .list-heading {
    gap: 12px;
    flex-wrap: wrap;
  }
  .list-tools {
    flex-wrap: wrap;
  }
  .search-wrap input[type="date"] {
    width: 123px;
  }
  .metric-anatomy .anatomy-empty {
    min-height: 145px;
  }
}
/* Source-ratio viewport and compact camera overlays. */
.capture-main {
  padding: 20px 28px 28px;
  max-width: 1480px;
}
.capture-shell {
  --camera-aspect: 1.3333333333;
  position: relative;
  width: 100%;
  max-width: calc((100svh - 118px) * var(--camera-aspect));
  margin: 0 auto;
  container-type: inline-size;
}
.capture-view {
  width: 100%;
  aspect-ratio: var(--camera-aspect);
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  background: #171a20;
}
.capture-view:after {
  display: none;
}
#camera-video {
  object-fit: fill;
}
.capture-top {
  inset: 20px 22px auto;
  left: 22px;
  right: 22px;
  top: 20px;
  padding: 0;
  background: none;
  text-shadow: none;
  align-items: start;
}
.capture-stage {
  --stage-bg: rgba(57, 76, 99, 0.78);
  --stage-ink: #f0f5ff;
  background: var(--stage-bg);
  color: var(--stage-ink);
  border-radius: 8px;
  padding: 12px 16px;
  backdrop-filter: blur(7px);
  box-shadow: none;
  text-shadow: none;
}
.capture-stage[data-phase="起弓"] {
  --stage-bg: rgba(40, 98, 180, 0.78);
  --stage-ink: #f2f7ff;
}
.capture-stage[data-phase="靠位"] {
  --stage-bg: rgba(255, 212, 90, 0.82);
  --stage-ink: #59400c;
}
.capture-stage[data-phase="撒放"] {
  --stage-bg: rgba(69, 197, 138, 0.82);
  --stage-ink: #073e29;
}
.capture-phase {
  gap: 13px;
}
.capture-phase h1 {
  font-size: 21px;
  font-weight: 600;
  color: inherit;
}
.capture-clock {
  font-size: 21px;
  color: inherit;
  opacity: 0.8;
  min-width: 4ch;
}
.capture-count {
  background: rgba(33, 63, 100, 0.76);
  color: #f1f6ff;
  border-radius: 8px;
  padding: 9px 14px;
  gap: 7px;
  backdrop-filter: blur(7px);
  text-shadow: none;
  box-shadow: none;
}
.capture-count b {
  font-size: 40px;
  line-height: 1;
}
.capture-count span {
  color: inherit;
  opacity: 0.8;
}
.capture-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 40px 22px 22px;
  gap: 24px;
  background: linear-gradient(0deg, #0b1421e6, #0b1421a3 66%, #0b142100);
  border: 0;
}
.hud-readings {
  position: static;
  inset: auto;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px 27px;
  align-items: end;
  min-width: 0;
}
.hud-reading {
  padding: 0;
  min-width: 0;
  border: 0;
  flex: 0 0 auto;
}
.hud-reading .metric-label {
  font-size: 10px;
  color: #d7e1ef;
  cursor: default;
}
.hud-reading .data-number {
  font-size: 32px;
  line-height: 1.1;
  margin-top: 7px;
  color: #fff;
}
.hud-reading .last-six {
  font-size: 10px;
  margin-left: 5px;
}
.capture-controls {
  justify-self: end;
  align-self: end;
  gap: 14px;
  white-space: nowrap;
  order: initial;
  grid-column: auto;
  grid-row: auto;
  width: auto;
}
.camera-toggle {
  padding: 11px 0;
  color: #e5edf8;
  font-size: 11px;
}
.capture-action {
  padding: 11px 18px;
  font-size: 11px;
}
.toast-root {
  top: 13px;
  bottom: auto;
  max-width: min(440px, calc(100vw - 28px));
  display: block;
  max-height: 44px;
  overflow: hidden;
}
.toast {
  margin: 0;
  background: #25354ef2;
  box-shadow: none;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 11px 16px;
}
.toast.error {
  background: #964f49f2;
}
@media (max-width: 900px) {
  .capture-bottom {
    gap: 18px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .hud-readings {
    gap: 12px 18px;
  }
  .hud-reading .data-number {
    font-size: 28px;
  }
  .capture-controls {
    gap: 11px;
  }
  .capture-action {
    padding: 10px 14px;
  }
}
@media (max-width: 650px) {
  .capture-main {
    padding: 12px 12px 18px;
  }
  .capture-shell {
    max-width: calc((100svh - 91px) * var(--camera-aspect));
  }
  .capture-view {
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .capture-top {
    inset: 12px 12px auto;
    padding: 0;
  }
  .capture-stage {
    padding: 8px 10px;
    border-radius: 6px;
  }
  .capture-phase {
    gap: 8px;
  }
  .capture-phase h1,
  .capture-clock {
    font-size: 16px;
  }
  .capture-count {
    padding: 6px 9px;
    border-radius: 6px;
  }
  .capture-count b {
    font-size: 28px;
  }
  .capture-count span {
    font-size: 9px;
  }
  .capture-bottom {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 24px 12px 12px;
  }
  .hud-readings {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    grid-row: 1;
    align-items: end;
  }
  .hud-reading .metric-label {
    font-size: 9px;
    white-space: nowrap;
  }
  .hud-reading .data-number {
    font-size: 24px;
    margin-top: 5px;
  }
  .hud-reading .last-six {
    font-size: 8px;
    margin-left: 3px;
  }
  .capture-controls {
    justify-self: end;
    grid-column: 1;
    grid-row: 2;
    gap: 15px;
  }
  .camera-toggle,
  .capture-action {
    font-size: 10px;
  }
  .capture-action {
    padding: 8px 13px;
  }
  .camera-toggle {
    padding: 8px 0;
  }
  .toast-root {
    top: 9px;
  }
  .toast {
    font-size: 11px;
    padding: 10px 13px;
  }
}
.capture-view {
  container-type: inline-size;
}
.hud-reading {
  min-width: 94px;
}
@media (max-width: 900px) {
  .hud-reading {
    min-width: 82px;
  }
}
@media (max-width: 650px) {
  .hud-reading {
    min-width: 0;
  }
}
@container (max-width:650px) {
  .capture-top {
    inset: 12px 12px auto;
  }
  .capture-stage {
    padding: 8px 10px;
  }
  .capture-phase h1,
  .capture-clock {
    font-size: 16px;
  }
  .capture-count {
    padding: 6px 9px;
  }
  .capture-count b {
    font-size: 28px;
  }
  .capture-bottom {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 12px 12px;
    gap: 12px;
  }
  .hud-readings {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .hud-reading {
    min-width: 0;
  }
  .hud-reading .metric-label {
    font-size: 9px;
    white-space: nowrap;
  }
  .hud-reading .data-number {
    font-size: 24px;
  }
  .hud-reading .last-six {
    font-size: 8px;
    margin-left: 3px;
  }
  .capture-controls {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    gap: 15px;
  }
  .capture-action {
    padding: 8px 13px;
    font-size: 10px;
  }
  .camera-toggle {
    padding: 8px 0;
    font-size: 10px;
  }
}
.camera-settings select {
  max-width: 225px;
  text-overflow: ellipsis;
  overflow: hidden;
}
.camera-device-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0 2px;
}
.camera-device-tools small {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
.camera-device-tools button {
  white-space: nowrap;
}
.camera-output {
  display: block;
  max-width: 230px;
  text-align: right;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.camera-output small {
  display: block;
  font-family: Measure, sans-serif;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.camera-settings .setting-meta {
  font-size: 12px;
}
.camera-settings select:disabled {
  opacity: 0.5;
}

/* A quiet solid silhouette supports the measured skeleton without extra outlines. */
.anatomy-silhouette {
  fill: var(--theme-surface, #edf0f4);
  stroke: none;
}
.anatomy-silhouette-upper,
.anatomy-silhouette-fore {
  fill: none;
  stroke: var(--theme-rule, #edf0f4);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.anatomy-silhouette-upper {
  stroke-width: 14;
}
.anatomy-silhouette-fore {
  stroke-width: 10;
}
.anatomy-label {
  font-size: 13px;
  fill: var(--theme-secondary, #526b8c);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.anatomy-label-leader {
  fill: none;
  stroke: var(--theme-muted, #aebbc9);
  stroke-width: 0.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Compact capture header: phase, four readings, arrow count. */
.capture-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}
.capture-top > .capture-stage {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}
.capture-top > .hud-readings {
  grid-column: 2;
  grid-row: 1;
}
.capture-top > .capture-count {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}
.capture-top .capture-phase h1 {
  font-size: 32px;
  line-height: 1.1;
}
.capture-top .capture-count b {
  font-size: 56px;
}
.capture-top .hud-readings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(33, 49, 70, 0.74);
  border-radius: 8px;
  backdrop-filter: blur(7px);
}
.capture-top .hud-reading {
  min-width: 0;
}
.capture-top .hud-reading .metric-label {
  font-size: 11px;
  white-space: nowrap;
}
.capture-top .hud-reading .data-number {
  font-size: 32px;
  margin-top: 5px;
  white-space: nowrap;
}
.capture-bottom {
  grid-template-columns: minmax(0, 1fr);
  padding: 16px 22px;
  gap: 0;
}
.capture-bottom .capture-controls {
  grid-row: 1;
  grid-column: 1;
  justify-self: end;
}

/* A fixed date field; list selection belongs to the table header. */
.list-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin-bottom: 26px;
}
.record-date-field {
  display: flex;
  align-items: center;
  width: 184px;
  height: 40px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 6px 8px;
  gap: 3px;
}
.record-date-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--theme-secondary, #53657c);
  color-scheme: light;
  outline-offset: 0;
}
.record-date-field .date-empty {
  color: transparent;
}
.record-date-field .date-empty::-webkit-datetime-edit {
  opacity: 0;
}
.date-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  height: 24px;
  color: var(--theme-secondary, #8795a7);
  padding: 0;
}
.date-clear svg {
  width: 13px;
  height: 13px;
}
.date-clear.is-empty {
  visibility: hidden;
}
.list-select {
  justify-self: end;
  white-space: nowrap;
  font-size: 11px;
  padding: 4px 0;
}
.list-selection {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 36px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.record-list-header,
.record-row {
  grid-template-columns: 1.35fr 0.65fr 0.8fr 1.25fr 34px;
}
.record-row .list-date b {
  font-size: 23px;
}
.record-row .list-spark {
  display: block;
}
.record-list-header .spark-label {
  display: block;
}

/* Every metric category is one scrollable line. */
.metric-categories {
  gap: 2px;
  padding: 2px 0 10px;
}
.metric-category {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.metric-category h2 {
  font-size: 12px;
  font-weight: 650;
  line-height: 34px;
  color: var(--theme-secondary, #45566e);
}
.metric-tags {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  gap: 6px;
  padding: 2px 0 4px;
  scrollbar-width: thin;
  scrollbar-color: #cdd7e5 transparent;
  touch-action: pan-x pan-y;
}
.metric-tags::-webkit-scrollbar {
  height: 3px;
}
.metric-tags::-webkit-scrollbar-thumb {
  background: var(--theme-surface, #cdd7e5);
  border-radius: 3px;
}
.metric-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 29px;
  white-space: nowrap;
}
.metric-common {
  font-size: 9px;
  line-height: 1;
  color: var(--theme-accent-orange, #c87537);
  flex-shrink: 0;
}

/* Full-width trend plot and a value row aligned with playback controls. */
.mini-chart {
  display: block;
  grid-template-columns: none;
  height: var(--window-height);
  overflow: hidden;
}
.chart-area {
  width: 100%;
  height: 100%;
}
.trend-footer {
  height: var(--window-footer);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 0 8px;
}
.trend-metric-name {
  font-size: 12px;
  color: var(--muted);
}
.trend-footer .metric-value {
  font-size: 31px;
  line-height: 32px;
  font-weight: 500;
  margin: 0 0 0 auto;
}
.metric-help {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #9cacc0;
  border-radius: 50%;
  font:
    13px Georgia,
    serif;
  color: var(--theme-secondary, #6b7d96);
  padding: 0;
}
@media (hover: hover) and (pointer: fine) {
  .metric-help:hover {
    border-color: var(--blue);
    color: var(--blue);
  }
}

.metric-help-dialog {
  max-width: 460px;
}
.metric-help-dialog .metric-anatomy {
  max-width: none;
  margin: 14px 0 0;
}
.metric-help-dialog .anatomy-svg {
  height: 260px;
  width: 100%;
}
.metric-help-dialog .anatomy-source {
  font-size: 12px;
}
.metric-help-dialog figcaption {
  max-width: none;
  font-size: 12px;
  line-height: 1.8;
  margin-top: 10px;
}
.details-body {
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}
.details-table thead th {
  position: static;
}
.record-workspace,
.shot-details {
  overflow-anchor: none;
}

@container (max-width:650px) {
  .capture-top {
    gap: 8px;
    align-items: center;
  }
  .capture-top .capture-phase h1 {
    font-size: 22px;
  }
  .capture-top .capture-stage {
    padding: 8px;
  }
  .capture-top .capture-count {
    padding: 6px 8px;
    gap: 4px;
  }
  .capture-top .capture-count b {
    font-size: 40px;
  }
  .capture-top .hud-readings {
    padding: 9px 8px;
    gap: 5px;
    border-radius: 6px;
  }
  .capture-top .hud-reading .metric-label {
    font-size: 8px;
  }
  .capture-top .hud-reading .data-number {
    font-size: 20px;
    margin-top: 4px;
  }
}
@media (max-width: 650px) {
  .capture-bottom {
    padding: 18px 0 0;
    gap: 0;
  }
  .capture-bottom .capture-controls {
    grid-row: 1;
    justify-self: stretch;
  }
  .list-heading {
    margin-bottom: 20px;
    gap: 10px;
  }
  .record-date-field {
    width: 158px;
    height: 36px;
    padding: 5px 6px;
  }
  .record-date-field input {
    font-size: 11px;
  }
  .record-list-header,
  .record-row {
    grid-template-columns: minmax(76px, 1.15fr) 48px 58px minmax(40px, 1fr) 28px;
    gap: 8px;
  }
  .record-list-header {
    font-size: 10px;
    white-space: nowrap;
  }
  .record-list-header .spark-label,
  .record-row .list-spark {
    display: block;
  }
  .record-row {
    padding: 22px 0;
  }
  .record-row .list-date {
    flex-direction: column;
    align-items: start;
    gap: 4px;
  }
  .record-row .list-date b {
    font-size: 17px;
    white-space: nowrap;
  }
  .record-row .list-date small {
    font-size: 9px;
    white-space: nowrap;
  }
  .record-row .list-number {
    font-size: 21px;
    white-space: nowrap;
  }
  .record-row > .list-spark {
    width: 100%;
    height: 34px;
  }
  .record-row > svg:not(.list-spark) {
    width: 15px;
    height: 15px;
    justify-self: end;
  }
  .list-select {
    font-size: 10px;
  }
  .metric-categories {
    gap: 1px;
    padding: 0 0 9px;
  }
  .metric-category {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 6px;
  }
  .metric-category h2 {
    font-size: 11px;
    line-height: 31px;
  }
  .metric-tags {
    gap: 5px;
    padding-bottom: 3px;
  }
  .metric-tag {
    min-height: 28px;
    font-size: 11px;
    padding: 5px 8px;
  }
  .trend-footer {
    gap: 10px;
  }
  .trend-metric-name {
    font-size: 11px;
  }
  .trend-footer .metric-value {
    font-size: 28px;
  }
  .details-body {
    max-height: none;
    overflow: visible;
  }
}

/* Mobile: controls remain outside the source-ratio image. */
@media (max-width: 650px) {
  .capture-shell {
    max-width: none;
  }
  .capture-bottom {
    position: static;
    inset: auto;
    background: none;
    min-height: 0;
    padding: 18px 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    color: var(--ink);
  }
  .capture-bottom .hud-readings {
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .capture-bottom .hud-reading .metric-label {
    color: var(--muted);
    font-size: 10px;
  }
  .capture-bottom .hud-reading .data-number {
    color: var(--ink);
    font-size: 28px;
    margin-top: 6px;
  }
  .capture-bottom .hud-reading .unit,
  .capture-bottom .hud-reading .angle-unit,
  .capture-bottom .hud-reading .last-six {
    color: var(--muted);
  }
  .capture-bottom .capture-controls {
    grid-row: 1;
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .capture-bottom .camera-toggle,
  .capture-bottom .capture-action {
    min-height: 44px;
    justify-content: center;
    font-size: 12px;
    padding: 10px 12px;
  }
  .capture-bottom .camera-toggle {
    color: var(--ink);
    border: 1px solid var(--rule);
    border-radius: 24px;
  }
  .capture-bottom .capture-action {
    background: #218452;
    color: #fff;
    border-color: #218452;
  }
  .capture-bottom .capture-action .record-dot {
    background: #fff;
  }
  .capture-bottom .capture-action.running {
    background: #cf4654;
    border-color: var(--theme-accent-red, #cf4654);
  }
}

/* v128: stable navigation and capture overlays with independent contrast. */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
}
html {
  scroll-padding-top: 86px;
}
.skip:focus {
  z-index: 30;
}
.toast-root {
  z-index: 40;
}
.capture-top {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}
.capture-top > .capture-stage,
.capture-top > .hud-readings {
  min-height: 78px;
  align-self: stretch;
}
.capture-top > .capture-stage {
  display: flex;
  align-items: center;
}
.capture-view > .capture-count {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  padding: 10px 14px;
  background: rgba(33, 49, 70, 0.76);
}
.capture-view > .capture-count b {
  font-size: 56px;
}
.capture-bottom {
  background: none;
}
.capture-bottom .camera-toggle {
  padding: 11px 16px;
  background: rgba(23, 34, 48, 0.82);
  color: #fff;
  border: 1px solid #ffffff38;
  border-radius: 24px;
  backdrop-filter: blur(7px);
}
.capture-bottom .capture-action {
  background: #218452;
  color: #fff;
  border-color: #218452;
}
.capture-bottom .capture-action .record-dot {
  background: #fff;
}
.capture-bottom .capture-action.running {
  background: #cf4654;
  border-color: var(--theme-accent-red, #cf4654);
}
.capture-bottom button:disabled {
  opacity: 0.6;
}
.model-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 28px);
  padding: 13px 17px;
  border-radius: 7px;
  background: rgba(23, 34, 48, 0.9);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}
.model-hint[hidden] {
  display: none;
}
.model-spinner {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border: 2px solid #ffffff38;
  border-top-color: var(--theme-rule, #fff);
  border-radius: 50%;
  animation: model-spin 0.9s linear infinite;
}
@keyframes model-spin {
  to {
    transform: rotate(360deg);
  }
}

/* The native date input stays mounted while filtering the record rows. */
.record-title {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.record-title .list-select {
  font-size: 12px;
}
.record-date-field {
  position: relative;
  display: block;
  padding: 0;
  width: 184px;
}
.date-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: var(--theme-secondary, #7b8b9f);
  pointer-events: none;
}
.date-icon svg {
  width: 16px;
  height: 16px;
}
.record-date-field input {
  position: relative;
  display: block;
  width: calc(100% - 31px);
  height: 100%;
  padding: 0 8px 0 31px;
  text-align: center;
  font-size: 12px;
}
.record-date-field input::-webkit-date-and-time-value {
  text-align: center;
  min-height: 1em;
}
.record-date-field input::-webkit-datetime-edit {
  text-align: center;
}
.record-date-field input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.record-date-field .date-empty::-webkit-date-and-time-value {
  color: transparent;
}
.date-clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.record-list-header,
.record-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr);
  gap: 24px;
}
.record-row {
  width: 100%;
  text-align: left;
  align-items: baseline;
}
.record-row .list-date {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 6px;
}
.record-row .list-date b,
.record-row .list-number {
  display: block;
  font-size: 26px;
  line-height: 32px;
  font-weight: 500;
}
.record-row .list-date b {
  white-space: nowrap;
}
.list-trend {
  display: flex;
  align-items: center;
  align-self: start;
  gap: 14px;
  min-width: 0;
  height: 40px;
  margin-top: -4px;
}
.list-trend .list-spark {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 40px;
}
.list-trend > svg:not(.list-spark) {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.metric-strip {
  position: relative;
  min-width: 0;
}
.metric-tags {
  scrollbar-width: none;
  padding: 2px 16px 4px;
}
.metric-tags::-webkit-scrollbar {
  display: none;
}
.metric-scroll {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--theme-secondary, #7b8c9f);
  background: var(--paper);
}
.metric-scroll[hidden] {
  display: none;
}
.metric-scroll.left {
  left: 0;
}
.metric-scroll.right {
  right: 0;
}
.metric-scroll i {
  display: block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.metric-scroll.left i {
  border-right: 5px solid currentColor;
}
.metric-scroll.right i {
  border-left: 5px solid currentColor;
}
@media (hover: hover) and (pointer: fine) {
  .metric-scroll:hover {
    color: var(--blue);
  }
}

.trend-footer {
  justify-content: space-between;
  gap: 16px;
}
#metric-readout {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.trend-metric-name {
  font-size: 15px;
  font-weight: 550;
  color: var(--theme-text, #40526b);
  line-height: 1.3;
}
.trend-footer .metric-value {
  margin: 0 0 0 20px;
  font-size: 31px;
  white-space: nowrap;
}
.trend-footer .exclude-button {
  font-size: 12px;
  white-space: nowrap;
}
.replay-phase {
  top: 12px;
  right: 14px;
  font-size: 16px;
  font-weight: 650;
  line-height: 20px;
  padding: 7px 11px;
  border-radius: 5px;
  background: var(--theme-surface-active, #dce5ef);
  color: var(--theme-text, #42546a);
}
.replay-phase[data-phase="起弓"] {
  background: var(--theme-surface-active, #e0eafe);
  color: var(--theme-accent-blue, #245dde);
}
.replay-phase[data-phase="靠位"] {
  background: var(--theme-surface-active, #fff0d1);
  color: var(--theme-accent-orange, #936126);
}
.replay-phase[data-phase="撒放"] {
  background: var(--theme-surface-active, #ddefe5);
  color: var(--theme-accent-green, #217a50);
}
.details-table .metric-group th {
  font-size: 13px;
  font-weight: 650;
  color: var(--theme-text, #3c536f);
  background: var(--theme-surface-active, #eaf0f7);
  border-bottom: 1px solid var(--theme-rule, #d7e0ec);
  padding: 13px 21px;
  border-left: 3px solid #92a7c0;
}
.details-table .metric-group:not(:first-child) th {
  border-top: 12px solid var(--paper);
}
@container (max-width:650px) {
  .capture-top > .capture-stage,
  .capture-top > .hud-readings {
    min-height: 58px;
  }
  .capture-view > .capture-count {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
  }
  .capture-view > .capture-count b {
    font-size: 40px;
  }
}
@media (max-width: 650px) {
  html {
    scroll-padding-top: 76px;
  }
  .capture-bottom .camera-toggle {
    background: none;
    color: var(--ink);
    border-color: var(--rule);
    backdrop-filter: none;
  }
  .record-title {
    gap: 14px;
  }
  .record-title .list-select {
    font-size: 11px;
  }
  .record-date-field {
    width: 158px;
  }
  .date-icon {
    left: 9px;
  }
  .date-icon svg {
    width: 14px;
    height: 14px;
  }
  .record-date-field input {
    font-size: 11px;
    padding-left: 25px;
  }
  .record-list-header,
  .record-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.35fr);
    gap: 8px;
  }
  .record-row .list-date {
    gap: 4px;
  }
  .record-row .list-date b {
    font-size: 17px;
    line-height: 27px;
  }
  .record-row .list-number {
    font-size: 21px;
    line-height: 27px;
  }
  .list-trend {
    height: 31px;
    margin-top: -2px;
    gap: 7px;
  }
  .list-trend .list-spark {
    height: 31px;
  }
  .list-trend > svg:not(.list-spark) {
    width: 12px;
    height: 12px;
  }
  .metric-tags {
    padding-left: 13px;
    padding-right: 13px;
  }
  .metric-scroll {
    width: 13px;
  }
  .trend-metric-name {
    font-size: 13px;
  }
  #metric-readout {
    gap: 6px;
  }
  .trend-footer .metric-value {
    font-size: 28px;
    margin-left: 10px;
  }
  .trend-footer .exclude-button {
    font-size: 10px;
  }
  .metric-help {
    width: 19px;
    height: 19px;
    flex-basis: 19px;
  }
  .details-table .metric-group th {
    padding-left: 9px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .model-spinner {
    animation: none;
  }
}
@supports (-webkit-touch-callout: none) {
  .record-date-field input {
    font-size: 16px;
  }
}

/* v129: one metric rail, persistent settings title bar, distinct table levels. */
.capture-stage {
  --stage-bg: rgba(92, 99, 108, 0.9);
  --stage-ink: #fff;
}
.capture-stage[data-phase="起弓"] {
  --stage-bg: rgba(0, 116, 249, 0.93);
  --stage-ink: #fff;
}
.capture-stage[data-phase="靠位"] {
  --stage-bg: rgba(255, 199, 26, 0.94);
  --stage-ink: #493206;
}
.capture-stage[data-phase="撒放"] {
  --stage-bg: rgba(24, 201, 114, 0.93);
  --stage-ink: #063f27;
}
#settings-dialog {
  padding: 0;
  overflow: hidden;
  max-height: calc(100svh - 32px);
  width: 400px;
}
#settings-dialog[open] {
  display: flex;
  flex-direction: column;
}
#settings-dialog .dialog-head {
  flex: 0 0 auto;
  min-height: 68px;
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
#settings-dialog .settings-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 24px 24px;
  scrollbar-width: thin;
}
.advanced-settings {
  padding-top: 16px;
  border-bottom: 1px solid var(--rule);
}
.advanced-settings summary {
  font-size: 12px;
  color: var(--theme-secondary, #718095);
  cursor: pointer;
  padding-bottom: 16px;
}
.advanced-settings[open] summary {
  padding-bottom: 0;
}
.advanced-settings .setting-row {
  border-bottom: 0;
}
.metric-categories {
  display: block;
  padding: 2px 0 10px;
  margin-bottom: 8px;
  min-width: 0;
}
.metric-categories > .metric-strip {
  width: 100%;
}
.metric-tags {
  gap: 7px;
}
.trend-footer {
  align-items: center;
}
#metric-readout {
  align-items: baseline;
  gap: 8px;
}
.trend-footer .metric-value {
  margin: 0 12px 0 0;
  font-size: 31px;
  line-height: 32px;
}
.trend-metric-name {
  font-size: 15px;
  line-height: 20px;
  font-weight: 550;
  white-space: nowrap;
}
.metric-help {
  font-size: 15px;
  line-height: 1;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border-color: #a2afbd;
}
.trend-footer .exclude-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0;
  line-height: 32px;
}
.replay-phase {
  left: 14px;
  right: auto;
}
.replay-label {
  left: auto;
  right: 16px;
  top: 21px;
  text-align: right;
}
.details-table thead th {
  font-size: 13px;
  font-weight: 650;
  color: #edf3fb;
  background: #334a66;
  border-bottom: 2px solid #233b58;
  padding-top: 13px;
  padding-bottom: 13px;
}
.details-table thead th:nth-child(2) {
  color: var(--theme-accent-orange, #ffd477);
}
.details-table thead th:nth-child(3) {
  color: var(--theme-accent-green, #84e4b3);
}
.details-table .metric-group th {
  background: var(--theme-surface, #edf1f6);
  color: var(--theme-secondary, #596d86);
  font-size: 12px;
  font-weight: 600;
  border-left: 0;
  letter-spacing: 0.5px;
}
.details-table tr.active-metric td {
  background: transparent;
  color: var(--blue);
  font-weight: 600;
  border-bottom-color: var(--theme-rule, #b8cbee);
}
.details-table tr.active-metric td:first-child {
  box-shadow: none;
}
.details-table tr.active-metric td:first-child:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  margin: 0 8px 2px 0;
}
@media (max-width: 650px) {
  #settings-dialog .dialog-head {
    min-height: 60px;
    padding: 12px 20px;
  }
  #settings-dialog .settings-body {
    padding: 0 20px 20px;
  }
  .metric-categories {
    padding-top: 0;
    padding-bottom: 9px;
  }
  .metric-tags {
    gap: 6px;
  }
  .trend-footer .metric-value {
    font-size: 28px;
    margin: 0 5px 0 0;
  }
  .trend-metric-name {
    font-size: 13px;
    line-height: 18px;
  }
  .metric-help {
    font-size: 13px;
    width: 13px;
    height: 13px;
    flex-basis: 13px;
  }
  .replay-phase {
    left: 12px;
  }
  .replay-label {
    right: 12px;
  }
  .details-table thead th {
    font-size: 12px;
  }
  .details-table .metric-group th {
    font-size: 11px;
  }
}

/* v130: date and batch actions share a dedicated row below the title. */
.list-heading {
  margin-bottom: 16px;
}
.record-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.record-batch-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
  margin-left: auto;
  white-space: nowrap;
  font-size: 12px;
}
.record-batch-actions .text-button {
  font-size: 12px;
}
.record-selected-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.record-row .list-date,
.record-row .list-date b,
.record-row .list-date small {
  font-family: Measure, sans-serif;
  font-variant-numeric: tabular-nums;
}
.record-row .list-date b,
.record-row .list-number {
  font-size: 26px;
  line-height: 32px;
  font-weight: 500;
}
.list-trend {
  gap: 0;
}
@media (max-width: 650px) {
  .list-heading {
    margin-bottom: 14px;
  }
  .record-toolbar {
    gap: 8px;
    margin-bottom: 20px;
  }
  .record-toolbar .record-date-field {
    width: clamp(132px, 40vw, 158px);
    flex-shrink: 0;
  }
  .record-batch-actions {
    gap: 8px;
    font-size: 11px;
  }
  .record-batch-actions .text-button {
    font-size: 11px;
  }
  .record-row .list-date b,
  .record-row .list-number {
    font-size: clamp(17px, 5.1vw, 21px);
    line-height: 27px;
  }
}

/* v131: a labelled metric rail and a shared text baseline. */
.metric-categories {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.metric-rail-label {
  font-size: 13px;
  font-weight: 650;
  line-height: 29px;
  color: var(--theme-text, #3b4d64);
  white-space: nowrap;
}
.metric-categories > .metric-strip {
  min-width: 0;
}
.trend-footer {
  align-items: baseline;
}
.trend-footer .exclude-button {
  align-items: baseline;
}
.trend-footer .exclude-button svg {
  align-self: center;
}
.metric-help {
  position: relative;
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  align-self: baseline;
  transform: translateY(2px);
}
.metric-help svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke-width: 1.6;
  flex-shrink: 0;
}
.replay-controls > * {
  transform: translateY(var(--replay-control-shift, 0px));
}
@media (max-width: 650px) {
  .metric-categories {
    gap: 9px;
  }
  .metric-rail-label {
    font-size: 12px;
    line-height: 28px;
  }
}

/* v132: stacked replay rows stay local; date text fits the mobile field. */
.capture-stage[data-phase="准备"] {
  --stage-bg: rgba(92, 99, 108, 0.9);
  --stage-ink: #fff;
}
.record-list-header,
.record-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.record-date-value {
  display: none;
}
@media (max-width: 1000px) {
  .replay-controls > * {
    transform: none;
  }
}
@media (max-width: 650px) {
  .record-date-field input {
    font-size: 16px;
    opacity: 0;
  }
  .record-date-field:focus-within {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
  }
  .record-date-value {
    position: absolute;
    left: 30px;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    text-align: center;
    font:
      12px Measure,
      sans-serif;
    font-variant-numeric: tabular-nums;
    color: var(--theme-secondary, #53657c);
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
  }
}

/* v141: outside dimension arrows and an optional sample-frame link. */
.anatomy-measure,
.anatomy-motion-arrow {
  fill: none;
  stroke: var(--raw);
  stroke-width: 1.2;
  stroke-linecap: round;
}
.trend-heading-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.metric-frame-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--theme-secondary, #738299);
  white-space: nowrap;
  cursor: pointer;
}
.metric-frame-toggle input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: block;
  width: 26px;
  height: 15px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: var(--theme-surface, #c7d0dc);
  cursor: pointer;
  flex-shrink: 0;
}
.metric-frame-toggle input::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: var(--theme-surface, #fff);
  transition: transform 0.15s;
}
.metric-frame-toggle input:checked {
  background: var(--blue);
}
.metric-frame-toggle input:checked::after {
  transform: translateX(11px);
}
.metric-frame-toggle:has(input:checked) {
  color: var(--theme-accent-blue, #365f9e);
}
.metric-frame-toggle input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
@media (max-width: 650px) {
  .record-workspace .trend-heading {
    height: auto;
    min-height: 44px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px;
    padding: 8px 0;
  }
  .trend-heading-title {
    gap: 12px;
  }
  .metric-frame-toggle {
    min-height: 28px;
    font-size: 11px;
  }
  .trend-heading .legend {
    margin-left: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .metric-frame-toggle input::after {
    transition: none;
  }
}

/* v156: replay first, then a twelve-arrow viewport with a pinned vertical axis. */
.record-workspace {
  grid-template-columns: minmax(350px, 1fr) minmax(0, 1.65fr);
}
.chart-area {
  position: relative;
}
.chart-scroll {
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8c5d7 transparent;
}
.chart-scroll::-webkit-scrollbar,
.rhythm-scroll::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.chart-scroll::-webkit-scrollbar-thumb,
.rhythm-scroll::-webkit-scrollbar-thumb {
  background: var(--theme-surface, #b8c5d7);
  border-radius: 4px;
}
.chart-scroll::-webkit-scrollbar-track,
.rhythm-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.chart-scroll .chart-svg {
  max-width: none;
  flex-shrink: 0;
}
.chart-axis {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  background: var(--window-fill);
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.chart-axis text {
  font:
    11px Measure,
    sans-serif;
  fill: var(--theme-secondary, #75818e);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 1000px) {
  .record-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* v159: dashed angle marks and a live readout for the selected replay frame. */
.anatomy-sector {
  stroke-dasharray: 3 3;
}
.replay-metric {
  position: absolute;
  left: 14px;
  top: 54px;
  z-index: 1;
  max-width: calc(100% - 28px);
  padding: 5px 9px 6px;
  background: rgba(242, 245, 249, 0.88);
  border-radius: 4px;
  pointer-events: none;
}
.replay-metric > span {
  display: block;
  color: var(--theme-secondary, #718096);
  font-size: 11px;
  line-height: 16px;
}
.replay-metric > b {
  display: block;
  margin-top: 2px;
  color: var(--theme-accent-blue, #426add);
  font-size: 28px;
  line-height: 32px;
  white-space: nowrap;
}
@media (max-width: 650px) {
  .replay-metric {
    left: 12px;
    max-width: calc(100% - 24px);
  }
  .replay-metric > b {
    font-size: 26px;
    line-height: 30px;
  }
}

/* v161: separate measurement guides and opposite-side event markers. */
:root {
  --window-footer: 80px;
}
.seek-wrapper {
  height: 80px;
}
.phase-marker.release {
  top: 46px;
  height: 27px;
  flex-direction: column-reverse;
  gap: 4px;
}
.phase-marker.release .event-mark {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* v162: replay annotations have their own control, beside the arrow heading. */
.replay-heading-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.replay-heading-title h2 {
  white-space: nowrap;
}
.replay-metric[hidden] {
  display: none;
}
@media (max-width: 650px) {
  .replay-heading-title {
    gap: 12px;
  }
}

/* v163: trend first, with replay annotations in opposite upper corners. */
.record-workspace {
  grid-template-columns: minmax(0, 1.65fr) minmax(350px, 1fr);
}
.replay-phase {
  left: auto;
  right: 14px;
}
.replay-metric {
  top: 12px;
  max-width: calc(100% - 106px);
}
@media (max-width: 1000px) {
  .record-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 650px) {
  .replay-phase {
    left: auto;
    right: 12px;
  }
}

/* v164: playback clicks always target the stable button, not a changing SVG child. */
[data-action="play"] svg {
  pointer-events: none;
}

/* v165: larger replay targets share space with a slightly shorter seek track. */
.replay-controls {
  grid-template-columns: 108px minmax(0, 1fr) 80px;
}
.playback-tools {
  height: 36px;
  margin-top: 22px;
}
.playback-tools .icon-button {
  width: 36px;
  height: 36px;
}
.playback-tools .icon-button svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 650px) {
  .replay-controls {
    grid-template-columns: 102px minmax(0, 1fr) 77px;
  }
  .playback-tools .icon-button {
    width: 34px;
    height: 36px;
  }
}

/* v167: a quiet, progressive time trace beneath the replay metric value. */
.replay-metric-chart {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  margin-top: 3px;
  overflow: hidden;
}
.replay-metric-axes {
  fill: none;
  stroke: var(--theme-rule, #b5c1d1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.replay-metric-curve {
  fill: none;
  stroke: var(--theme-accent-blue, #8bb9ef);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 650px) {
  .replay-metric-chart {
    width: 110px;
    margin-top: 3px;
  }
}

/* v169: only two quiet colored event points on the replay trace. */
.replay-time-event.anchor {
  fill: var(--theme-accent-orange, #ffd45a);
}
.replay-time-event.release {
  fill: var(--theme-accent-green, #45c58a);
}

/* v170: browse metric illustrations without leaving the current review. */
.metric-help-dialog {
  max-width: 560px;
}
.metric-help-body {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 4px;
  align-items: start;
}
.metric-help-body .metric-anatomy {
  margin: 0;
}
.metric-help-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  margin-top: 112px;
  padding: 0;
  color: var(--theme-secondary, #8292a8);
  border-radius: 5px;
}
.metric-help-nav svg {
  width: 23px;
  height: 23px;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .metric-help-nav:hover {
    color: var(--blue);
    background: var(--theme-surface-active, #edf2fa);
  }
}

@media (max-width: 650px) {
  .metric-help-dialog {
    padding: 18px 12px;
  }
  .metric-help-body {
    gap: 0;
    grid-template-columns: 24px minmax(0, 1fr) 24px;
  }
  .metric-help-nav {
    width: 24px;
  }
}

/* v171: white rims separate the yellow and green event points from the trace. */
.replay-time-event {
  stroke: #fff;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

/* v175: prevent double-tap zoom while retaining native pan and pinch gestures. */
html,
body,
.app-shell,
.metric-tags,
.chart-scroll,
.chart-svg,
.chart-svg .hit,
.replay-view,
.settings-body,
.modal,
dialog {
  touch-action: manipulation;
}
.chart-svg,
.chart-svg .hit {
  -webkit-tap-highlight-color: transparent;
}

/* v176: every item in the metric rail shares the same horizontal centerline. */
.metric-rail-label {
  display: flex;
  align-items: center;
  height: 36px;
  line-height: 16px;
}
.metric-strip {
  height: 36px;
}
.metric-tags {
  height: 36px;
  align-items: center;
  padding: 0 16px;
}
.metric-tag {
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  line-height: 16px;
}
.metric-tag-name {
  display: inline-flex;
  align-items: center;
  height: 16px;
  line-height: 16px;
}
.metric-common {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  height: 16px;
  line-height: 16px;
}
.metric-common svg {
  display: block;
  width: 10px;
  height: 10px;
  fill: currentColor;
}
.metric-scroll {
  top: 0;
  bottom: auto;
  height: 36px;
}
.metric-scroll i {
  flex-shrink: 0;
  line-height: 0;
}
@media (max-width: 650px) {
  .metric-rail-label,
  .metric-strip,
  .metric-tags,
  .metric-scroll {
    height: 34px;
  }
  .metric-rail-label {
    line-height: 16px;
  }
  .metric-tags {
    padding: 0 13px;
  }
  .metric-tag {
    height: 28px;
    min-height: 28px;
    padding: 0 8px;
    line-height: 16px;
  }
}

/* v177: compact star labels and event markers around the seek track. */
.metric-tag {
  gap: 2px;
}
:root {
  --window-footer: 60px;
}
.seek-wrapper {
  height: 60px;
  padding-top: 28px;
}
.playback-tools {
  margin-top: 12px;
}
.playback-time {
  margin-top: 14px;
}
.phase-marker {
  top: 8px;
  height: 18px;
  gap: 1px;
  line-height: 12px;
  justify-content: flex-start;
}
.phase-marker.release {
  top: 34px;
  height: 18px;
  gap: 1px;
}
.phase-marker span {
  display: block;
  height: 12px;
  line-height: 12px;
  border: 0;
}
@media (hover: hover) and (pointer: fine) {
  .phase-marker:hover span {
    text-decoration: underline;
    text-underline-offset: 2px;
  }
}

.phase-marker .event-mark,
.phase-marker .event-mark.release {
  width: 7px;
  height: 5px;
}
.trend-footer {
  padding: 12px 0 6px;
}

/* v178: keep the seek thumb above the anchor and release markers. */
.seek {
  position: relative;
  z-index: 2;
}

/* v179: delayed main view with a draggable, live camera inset. */
.capture-delay-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #ffffff38;
  border-radius: 24px;
  background: rgba(23, 34, 48, 0.82);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(7px);
}
.capture-delay-control select {
  border: 0;
  background: transparent;
  color: inherit;
  min-height: 24px;
  padding: 0 3px;
  font-size: 12px;
  cursor: pointer;
}
.capture-delay-control option {
  color: var(--ink);
  background: var(--paper);
}
.capture-pip {
  position: absolute;
  left: 8px;
  top: 8px;
  width: clamp(110px, 23%, 260px);
  aspect-ratio: var(--camera-aspect);
  z-index: 4;
  border: 1px solid #ffffffa6;
  border-radius: 8px;
  background: #171a20;
  box-shadow: 0 3px 16px #0004;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.capture-pip[hidden],
.capture-delay-status[hidden] {
  display: none;
}
.capture-diagnostics {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  max-width: calc(100% - 20px);
  white-space: normal;
}
.capture-diagnostics[hidden] {
  display: none;
}
.capture-pip.dragging {
  cursor: grabbing;
}
.capture-pip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scaleX(-1);
  pointer-events: none;
}
.capture-pip > span {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 6px;
  border-radius: 3px;
  background: #132032b8;
  color: #fff;
  font-size: 10px;
  line-height: 14px;
  pointer-events: none;
}
.capture-pip > i {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 11px;
  height: 11px;
  opacity: 0.8;
  background: radial-gradient(circle, var(--theme-surface, #fff) 1px, transparent 1.5px) 0 0/5px 5px;
  pointer-events: none;
}
.capture-delay-status {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
  padding: 5px 9px;
  border-radius: 4px;
  background: #172230b8;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}
.capture-delay-status.buffering {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  font-size: 14px;
  padding: 10px 15px;
}
.capture-view:has(.capture-delay-status.buffering:not([hidden])) .model-hint {
  top: calc(50% + 50px);
}
@media (max-width: 650px) {
  .capture-bottom .capture-controls {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .capture-delay-control {
    grid-column: 1/-1;
    justify-self: start;
    padding: 5px 10px;
    background: var(--paper);
    border-color: var(--rule);
    color: var(--ink);
    backdrop-filter: none;
    font-size: 12px;
  }
  .capture-delay-control select {
    font-size: 12px;
  }
  .capture-pip {
    width: clamp(100px, 29%, 180px);
    border-radius: 6px;
  }
  .capture-delay-status {
    bottom: 10px;
    font-size: 10px;
  }
}

.capture-controls:has(.capture-delay-control) {
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* v180: keep delay selection free of focus highlight borders. */
.capture-delay-control select:focus,
.capture-delay-control select:focus-visible,
.capture-delay-control select:active {
  outline: none;
  box-shadow: none;
}

/* v181: release-aligned shot rhythm, sharing the replay and analysis viewport. */
.analysis-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  align-self: center;
  height: 28px;
  padding: 0;
  white-space: nowrap;
}
.analysis-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  color: var(--theme-secondary, #8491a2);
}
.analysis-tabs button[aria-selected="true"] {
  color: var(--ink);
}
.analysis-tabs button[aria-selected="true"]:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--blue);
}
.trend-heading-title .metric-frame-toggle[hidden] {
  display: none;
}
.rhythm-legend .rhythm-key {
  display: inline-block;
  width: 14px;
  height: 5px;
  border-radius: 2px;
  background: #89a7ce;
}
.rhythm-legend .rhythm-key.anchor {
  background: #e4ad66;
}
.rhythm-legend .rhythm-key.release {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #42af7d;
}
.rhythm-chart.mini-chart {
  display: flex;
  flex-direction: column;
  height: var(--window-height);
  padding: 26px 0 0;
  box-sizing: border-box;
  background: var(--window-fill);
  overflow: hidden;
  gap: 0;
}
.rhythm-table-head,
.rhythm-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 57px 57px;
  column-gap: 20px;
  align-items: center;
  padding: 0 16px 0 10px;
  text-align: right;
}
.rhythm-table-head {
  flex-shrink: 0;
  height: 39px;
  padding-top: 6px;
  color: var(--theme-secondary, #7c899a);
  font-size: 10px;
  border-bottom: 1px solid var(--theme-rule, #dfe5ed);
}
.rhythm-table-head > span:first-child {
  text-align: center;
}
.rhythm-table-head small {
  font-size: 9px;
  font-weight: 400;
}
.rhythm-axis {
  position: relative;
  height: 20px;
  margin-right: 4px;
}
.rhythm-axis > span {
  position: absolute;
  top: 1px;
  transform: translateX(-50%);
  font-family: Measure, sans-serif;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}
.rhythm-axis > span small {
  margin-left: 1px;
  color: var(--theme-muted, #9aa6b5);
}
.rhythm-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8c5d7 transparent;
}
.rhythm-row {
  position: relative;
  min-height: 36px;
  width: 100%;
  font-size: 12px;
  color: var(--theme-secondary, #58687f);
  border-bottom: 1px solid var(--theme-rule, #e5eaf2);
  border-radius: 0;
}
@media (hover: hover) and (pointer: fine) {
  .rhythm-row:hover {
    background: var(--theme-surface-active, #eaf0f8);
    color: var(--theme-accent-blue, #253c5e);
  }
}

.rhythm-row.selected {
  background: var(--theme-surface-active, #e5edf9);
  color: var(--theme-accent-blue, #245dde);
  box-shadow: inset 2px 0 #426add;
}
.rhythm-row.selected .rhythm-number,
.rhythm-row.selected .rhythm-cycle {
  font-weight: 600;
}
.rhythm-number {
  text-align: center;
  color: var(--theme-muted, #8796ab);
  font-size: 13px;
}
.rhythm-lane {
  position: relative;
  display: block;
  height: 35px;
  min-width: 0;
  margin-right: 4px;
}
.rhythm-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rhythm-guides > i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--theme-surface, #e1e7f0);
}
.rhythm-guides > i:first-child {
  background: var(--theme-surface, #b8cfc5);
}
.rhythm-segment,
.rhythm-unknown {
  position: absolute;
  top: 13px;
  height: 10px;
  pointer-events: none;
}
.rhythm-raise {
  background: #89a7ce;
  border-radius: 3px 0 0 3px;
}
.rhythm-anchor {
  background: #e4ad66;
}
.rhythm-unknown {
  background: var(--theme-surface, #bcc5d2);
  border-radius: 3px 0 0 3px;
}
.rhythm-anchor-mark {
  position: absolute;
  top: 12px;
  height: 12px;
  width: 2px;
  transform: translateX(-1px);
  background: #cc934b;
  pointer-events: none;
}
.rhythm-release-mark {
  position: absolute;
  left: 100%;
  top: 13px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--window-fill);
  border-radius: 50%;
  background: #42af7d;
  transform: translateX(-50%);
  pointer-events: none;
}
.rhythm-row.selected .rhythm-release-mark {
  border-color: var(--theme-rule, #e5edf9);
}
.rhythm-row.excluded {
  color: var(--theme-muted, #9aa3af);
}
.rhythm-row.excluded .rhythm-number {
  color: var(--theme-muted, #9aa3af);
}
.rhythm-row.excluded .rhythm-raise,
.rhythm-row.excluded .rhythm-anchor,
.rhythm-row.excluded .rhythm-unknown {
  background: var(--theme-surface, #b9c0ca);
}
.rhythm-row.excluded .rhythm-anchor-mark,
.rhythm-row.excluded .rhythm-release-mark {
  background: #8d98a7;
}
.rhythm-missing {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 10px;
  line-height: 35px;
  color: var(--theme-muted, #9aa6b5);
  white-space: nowrap;
}
.rhythm-clipped {
  position: absolute;
  left: 1px;
  top: 14px;
  width: 6px;
  height: 8px;
  border-left: 1px solid #737f90;
  border-bottom: 1px solid #737f90;
  transform: rotate(45deg);
  pointer-events: none;
}
.rhythm-duration {
  font-size: 15px;
}
.rhythm-cycle {
  color: inherit;
}
.rhythm-footer-anchor {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-left: 16px;
  font-size: 11px;
  color: var(--theme-secondary, #8995a5);
  white-space: nowrap;
}
.rhythm-footer-anchor b {
  color: var(--theme-accent-orange, #ad7d43);
  font-size: 17px;
}
@media (max-width: 650px) {
  .analysis-tabs {
    gap: 13px;
  }
  .analysis-tabs button {
    font-size: 12px;
  }
  .trend-heading-title:has(.analysis-tabs) {
    gap: 12px;
  }
  .rhythm-table-head,
  .rhythm-row {
    grid-template-columns: 24px minmax(0, 1fr) 40px 43px;
    column-gap: 12px;
    padding-left: 5px;
    padding-right: 8px;
  }
  .rhythm-table-head {
    height: 36px;
    font-size: 10px;
  }
  .rhythm-axis > span {
    font-size: 10px;
  }
  .rhythm-axis > span small {
    font-size: 8px;
  }
  .rhythm-duration {
    font-size: 14px;
  }
  .rhythm-footer-anchor {
    gap: 4px;
    margin-left: 8px;
    font-size: 10px;
  }
  .rhythm-footer-anchor b {
    font-size: 15px;
  }
}

/* v182: spatial comparison views use a common image-plane shoulder scale. */
.trend-heading:has(.analysis-tabs) {
  height: auto;
  min-height: 44px;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 0;
}
.trend-heading-title:has(.analysis-tabs) {
  flex-wrap: wrap;
  gap: 8px 16px;
}
.analysis-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  gap: 14px;
}
.analysis-tabs::-webkit-scrollbar {
  display: none;
}
.analysis-tabs button {
  flex-shrink: 0;
}
.spatial-chart.mini-chart {
  display: flex;
  flex-direction: column;
  height: var(--window-height);
  background: var(--window-fill);
  gap: 0;
  overflow: hidden;
}
.spatial-area {
  flex: 1;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
.spatial-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.spatial-grid {
  fill: none;
  stroke: var(--theme-rule, #e0e6ef);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.spatial-axis {
  fill: none;
  stroke: var(--theme-muted, #a9b9cd);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.spatial-tick {
  font:
    11px Measure,
    sans-serif;
  fill: var(--theme-secondary, #7d8c9f);
}
.spatial-axis-name {
  font-size: 9px;
  fill: var(--theme-secondary, #97a3b3);
}
.spatial-context {
  font-size: 10px;
  fill: var(--theme-secondary, #647995);
}
.spatial-count {
  font-size: 10px;
  fill: var(--theme-secondary, #8899ae);
}
.spatial-ellipse {
  fill: #8aafd51b;
  stroke: var(--theme-accent-blue, #91b1d4);
  stroke-width: 1.2;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}
.spatial-mean {
  fill: none;
  stroke: var(--theme-accent-blue, #6d96c5);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.spatial-dot {
  fill: var(--theme-accent-blue, #759bc9);
  stroke: #fff;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.spatial-dot.selected {
  fill: var(--theme-accent-orange, #d69a45);
  stroke-width: 1.8;
}
.spatial-dot.excluded {
  fill: var(--theme-secondary, #929eae);
}
.spatial-dot-hit,
.spatial-trace-hit {
  cursor: pointer;
}
.spatial-chart :is(.spatial-dot-hit, .spatial-trace-hit, .spatial-shot) {
  -webkit-tap-highlight-color: transparent;
}
.spatial-chart
  :is(.spatial-dot-hit, .spatial-trace-hit, .spatial-shot):is(:focus, :focus-visible, :active) {
  outline: none;
  box-shadow: none;
}
.spatial-point-label {
  font:
    600 11px Measure,
    sans-serif;
  fill: var(--theme-accent-orange, #aa7932);
  pointer-events: none;
}
.spatial-trace {
  fill: none;
  stroke: var(--theme-accent-blue, #93a9c7);
  stroke-width: 1.5;
  stroke-opacity: 0.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.spatial-trace.selected {
  stroke: url(#spatial-trace-selected);
  stroke-width: 3;
  stroke-opacity: 1;
}
.spatial-trace.excluded {
  stroke: var(--theme-muted, #abb2bc);
  stroke-dasharray: 3 3;
  stroke-opacity: 0.65;
}
.spatial-trace.excluded.selected {
  stroke: var(--theme-muted, #8d98a7);
  stroke-width: 3;
  stroke-opacity: 1;
}
.spatial-trace-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 14;
  pointer-events: stroke;
  vector-effect: non-scaling-stroke;
}
.spatial-origin {
  fill: none;
  stroke: var(--theme-accent-orange, #d3ad5b);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.spatial-note {
  font-size: 10px;
  fill: var(--theme-secondary, #9ca8b7);
  pointer-events: none;
}
.spatial-empty {
  font-size: 12px;
  fill: var(--theme-secondary, #92a0b3);
}
.spatial-shot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 12px;
  border-top: 1px solid var(--theme-rule, #e0e6ef);
  color: var(--theme-muted, #8a9aae);
  font-size: 10px;
}
.spatial-shots {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  overflow: auto;
  scrollbar-width: none;
  position: relative;
}
.spatial-shots::-webkit-scrollbar {
  display: none;
}
.spatial-shot {
  min-width: 27px;
  height: 27px;
  flex-shrink: 0;
  padding: 0 4px;
  border-radius: 4px;
  font:
    13px Measure,
    sans-serif;
  color: var(--theme-secondary, #7890b0);
}
.spatial-shot.selected {
  background: var(--theme-surface-active, #dee8f6);
  color: var(--theme-accent-blue, #245dde);
  font-weight: 600;
}
.spatial-shot.excluded {
  color: var(--theme-muted, #9ba4b0);
}
.spatial-shot.unavailable {
  color: var(--theme-muted, #b6bec9);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.spatial-footer-meta {
  font-size: 11px;
  color: var(--theme-muted, #8d9aab);
  margin-left: 13px;
  white-space: nowrap;
}
.legend .spatial-key {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #759bc9;
}
.legend .spatial-key.current {
  background: #d69a45;
}
.legend .spatial-key.range {
  width: 14px;
  height: 7px;
  border: 1px dashed var(--theme-accent-blue, #91b1d4);
  border-radius: 50%;
  background: #8aafd522;
}
@media (max-width: 650px) {
  .trend-heading-title:has(.analysis-tabs) {
    width: 100%;
    gap: 6px 12px;
    justify-content: space-between;
  }
  .analysis-tabs {
    gap: 12px;
  }
  .spatial-footer-meta {
    font-size: 9px;
    margin-left: 3px;
  }
  .spatial-context,
  .spatial-count {
    font-size: 9px;
  }
  .spatial-shot-row {
    padding: 0 9px;
    gap: 7px;
  }
  .spatial-shot {
    min-width: 26px;
  }
}

/* v186: analysis tools belong to their view; replay controls stay with the current arrow. */
.review-page {
  --window-height: 360px;
}
.review-page .session-heading {
  margin-bottom: 20px;
}
.review-page .session-title h1 {
  font-size: 22px;
  font-weight: 600;
}
.review-page .record-workspace {
  grid-template-columns: minmax(0, 3fr) minmax(350px, 2fr);
  gap: 28px;
}
.review-page .record-workspace .panel-heading {
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  border: 0;
}
.review-page .analysis-tabs {
  gap: 22px;
  height: 32px;
}
.review-page .analysis-tabs button {
  height: 32px;
  font-size: 15px;
  font-weight: 550;
}
.review-page .analysis-tabs button[aria-selected="true"] {
  font-weight: 650;
}
.review-page .panel-heading h2 {
  font-size: 15px;
}
.analysis-tools,
.replay-toolbar {
  height: 64px;
  min-width: 0;
  padding: 3px 0 7px;
}
.analysis-tools {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.analysis-metrics,
.analysis-context {
  min-width: 0;
}
.analysis-tools [hidden] {
  display: none;
}
.analysis-tools .metric-categories {
  border: 0;
  padding: 0;
  margin: 0;
  gap: 10px;
}
.analysis-tools .metric-tag {
  font-size: 13px;
}
.analysis-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  color: var(--theme-secondary, #66788f);
  font-size: 12px;
  line-height: 17px;
}
.analysis-count {
  color: var(--theme-secondary, #8491a2);
  white-space: nowrap;
  flex-shrink: 0;
}
.replay-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding-top: 7px;
}
.replay-toolbar .metric-frame-toggle {
  font-size: 12px;
  line-height: 18px;
  min-height: 28px;
}
.review-page .arrow-panel {
  scroll-margin-top: 82px;
}
.review-page .shot-details {
  margin-top: 16px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 1001px) and (max-height: 850px) {
  .review-page {
    --window-height: 320px;
  }
}
@media (max-width: 1000px) {
  .review-page .record-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .replay-toolbar {
    height: 44px;
    padding-top: 0;
  }
}
@media (max-width: 650px) {
  .review-page {
    --window-height: 280px;
  }
  .review-page .session-heading {
    margin-bottom: 16px;
  }
  .review-page .session-title h1 {
    font-size: 21px;
  }
  .review-page .analysis-tabs {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .review-page .analysis-tabs button {
    font-size: 14px;
  }
  .analysis-tools .metric-tag {
    font-size: 12px;
  }
  .analysis-context {
    font-size: 11px;
  }
  .review-page .spatial-footer-meta {
    font-size: 10px;
  }
}

/* v189: make the sticky return link and chart scrollbars easier to read. */
.review-page > .back-link {
  position: sticky;
  top: 70px;
  z-index: 9;
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  margin: 0 0 1px;
  background: var(--paper);
  border-bottom: 1px solid transparent;
}
@media (max-width: 650px) {
  .review-page > .back-link {
    top: 61px;
  }
}

/* v187: keep each analysis legend inside its plot, above the data area. */
.review-page .mini-chart > .analysis-legend,
.review-page .chart-area > .analysis-legend {
  position: absolute;
  z-index: 3;
  top: 5px;
  right: 12px;
  min-height: 18px;
  justify-content: flex-end;
  gap: 16px;
  margin: 0;
  font-size: 11px;
  line-height: 18px;
  white-space: nowrap;
  pointer-events: none;
}
.review-page .mini-chart {
  position: relative;
}
.review-page .mini-chart > .analysis-legend {
  top: 5px;
}
.review-page .chart-area > .analysis-legend {
  right: 12px;
}
@media (max-width: 650px) {
  .review-page .mini-chart > .analysis-legend,
  .review-page .chart-area > .analysis-legend {
    gap: 8px;
    font-size: 10px;
    right: 8px;
  }
}

/* Native thin scrollbars override WebKit pixel sizes in Chromium. */
@supports selector(::-webkit-scrollbar) {
  .chart-scroll,
  .rhythm-scroll {
    scrollbar-width: auto;
    scrollbar-color: auto;
  }
}

.review-page > .back-link.is-stuck {
  border-bottom-color: var(--theme-rule, #cbd5e1);
}

/* Theme tokens have per-declaration light fallbacks to preserve the light palette. */
:root {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #11161e;
  --ink: #e3eaf3;
  --muted: #95a3b6;
  --rule: #303c4d;
  --blue: #81aaff;
  --orange: #eda474;
  --window-fill: #19222e;
  --raw: #81aaff;
  --mean: #70c4ac;
  --spread: #b69cde;
  --excluded: #8893a3;
  --theme-text: #e3eaf3;
  --theme-secondary: #b5c2d3;
  --theme-muted: #94a4ba;
  --theme-rule: #303c4d;
  --theme-surface: #1b2532;
  --theme-surface-active: #243651;
  --theme-accent-blue: #90b5f8;
  --theme-accent-green: #81cfa9;
  --theme-accent-orange: #efb578;
  --theme-accent-purple: #bda6ec;
  --theme-accent-red: #f39b9b;
}
[data-theme="dark"] .plot-background {
  fill: var(--window-fill);
}
[data-theme="dark"] .replay-metric {
  background: rgb(25 34 46 / 90%);
}
[data-theme="dark"] .anatomy-silhouette,
[data-theme="dark"] .anatomy-silhouette-upper,
[data-theme="dark"] .anatomy-silhouette-fore {
  fill: #2b3849;
  stroke: #2b3849;
}
[data-theme="dark"] dialog::backdrop {
  background: rgb(0 0 0 / 65%);
}
[data-theme="dark"] .chart-scroll,
[data-theme="dark"] .rhythm-scroll {
  scrollbar-color: #52647e transparent;
}
@supports selector(::-webkit-scrollbar) {
  [data-theme="dark"] .chart-scroll,
  [data-theme="dark"] .rhythm-scroll {
    scrollbar-color: auto;
  }
  [data-theme="dark"] :is(.chart-scroll, .rhythm-scroll)::-webkit-scrollbar-thumb {
    background: #52647e;
  }
}

@media (hover: hover) and (pointer: fine) {
  .capture-bottom .capture-action:not(.running):not(:disabled):hover {
    background: #196b42;
    border-color: #196b42;
    color: #fff;
  }
}

.capture-main:not(.is-training) .capture-top,
.capture-main:not(.is-training) .capture-count {
  display: none;
}

/* Capture overlays reveal more of the camera image. */
.capture-top .hud-readings,
.capture-view > .capture-count {
  background: rgba(33, 49, 70, 0.42);
  backdrop-filter: blur(2px);
}
.capture-bottom .camera-toggle,
.capture-bottom .capture-action {
  width: 112px;
  flex: 0 0 112px;
  justify-content: center;
  white-space: nowrap;
}
@media (min-width: 651px) {
  .capture-bottom .camera-toggle,
  .capture-bottom .capture-action {
    padding-inline: 8px;
  }
}
.capture-delay-control {
  width: 150px;
  flex: 0 0 150px;
  white-space: nowrap;
}
.capture-delay-control select {
  min-width: 0;
  width: 66px;
}
@media (max-width: 650px) {
  .capture-bottom .capture-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .capture-bottom .camera-toggle,
  .capture-bottom .capture-action {
    width: 100%;
    min-width: 0;
  }
}

/* Keep select chevrons inset consistently on desktop and mobile. */
.setting-row select,
.capture-delay-control select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238391a4' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 14px 14px;
}
.setting-row select {
  background-position: right 10px center;
  padding: 6px 32px 6px 10px;
}
.capture-delay-control select {
  background-position: right 3px center;
  padding: 0 20px 0 2px;
}

/* Match the picture-in-picture to the camera's full frame and corner radius. */
.capture-pip {
  border: 0;
  border-radius: 5px;
}
.capture-pip video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
@media (max-width: 650px) {
  .capture-pip {
    border-radius: 4px;
  }
}
.capture-top {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.capture-top > .capture-count {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: stretch;
  display: flex;
  align-items: center;
  background: rgba(33, 49, 70, 0.42);
  backdrop-filter: blur(2px);
}
.capture-top > .hud-readings[hidden] {
  display: none !important;
}
.toast-root {
  top: 80px;
  right: 16px;
  bottom: auto;
  left: auto;
  transform: none;
  max-height: calc(100vh - 96px);
}
@media (max-width: 650px) {
  .toast-root {
    top: 71px;
    right: 12px;
  }
}

/* Circular delay control keeps the native picker and a compact state icon. */
.capture-delay-control {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
}
.capture-delay-control .capture-delay-glyph {
  display: block;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  pointer-events: none;
}
.capture-delay-glyph text {
  fill: currentColor;
  stroke: none;
  font:
    600 12px Measure,
    sans-serif;
}
.capture-delay-control select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  padding: 0;
  cursor: pointer;
}
.capture-delay-control:has(select:focus-visible) {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.capture-delay-status.buffering {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.capture-view:not(.is-connected) {
  background: #e4eaf1;
  color: #52657b;
}
:root[data-theme="dark"] .capture-view:not(.is-connected) {
  background: #171a20;
  color: #fff;
}
@media (max-width: 650px) {
  .capture-delay-control {
    width: 44px;
    height: 44px;
    padding: 0;
  }
}

/* Capture controls share a height; on phones they occupy one row. */
.capture-bottom .camera-toggle,
.capture-bottom .capture-action {
  height: 44px;
}
.capture-delay-glyph text {
  font-size: 10px;
}
@media (max-width: 650px) {
  .capture-bottom .capture-controls {
    grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }
  .capture-delay-control {
    grid-column: auto;
    justify-self: start;
  }
}

/* Timer icon and compact draggable camera preview. */
.capture-delay-control .capture-delay-glyph {
  stroke-width: 2.25;
  stroke-linejoin: round;
}
.capture-delay-glyph text {
  font-size: 14px;
}
.capture-pip {
  width: clamp(90px, 19%, 210px);
}
.capture-pip::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: inherit;
  pointer-events: none;
}
@media (max-width: 650px) {
  .capture-pip {
    width: clamp(80px, 23%, 150px);
  }
}
@media (hover: none) and (pointer: coarse) {
  .capture-delay-control:has(select:focus-visible),
  #settings-dialog [data-action="settings-close"]:focus-visible {
    outline: none;
    box-shadow: none;
  }
}

/* Timer, rectangular preview and unobtrusive motion. */
.capture-delay-control .capture-delay-glyph {
  stroke-width: 1.8;
}
.capture-delay-control {
  background: rgba(54, 71, 91, 0.78);
}
@media (max-width: 650px) {
  .capture-delay-control {
    background: var(--paper);
  }
}
.capture-view,
.capture-pip {
  border-radius: 0;
}
#settings-dialog:focus,
#settings-dialog:focus-visible {
  outline: none;
}
.toast-root {
  top: 90px;
}
@media (max-width: 650px) {
  .toast-root {
    top: 73px;
  }
}
@keyframes ui-fade-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes ui-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes ui-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes ui-backdrop-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.toast,
dialog[open],
.modal-backdrop .modal {
  animation: ui-fade-in 200ms ease-out both;
}
.toast.is-leaving,
dialog.is-leaving,
.modal-backdrop.is-leaving .modal {
  animation: ui-fade-out 180ms ease-in both;
}
dialog[open]::backdrop,
.modal-backdrop {
  animation: ui-backdrop-in 200ms ease-out both;
}
dialog.is-leaving::backdrop,
.modal-backdrop.is-leaving {
  animation: ui-backdrop-out 180ms ease-in both;
}
@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-leaving,
  dialog[open],
  dialog.is-leaving,
  dialog[open]::backdrop,
  dialog.is-leaving::backdrop,
  .modal-backdrop,
  .modal-backdrop.is-leaving,
  .modal-backdrop .modal,
  .modal-backdrop.is-leaving .modal {
    animation: none;
  }
}
@media (max-width: 650px) {
  .capture-delay-control {
    color: #66788e;
  }
  :root[data-theme="dark"] .capture-delay-control {
    color: #c1cede;
  }
}

/* Toasts connect to the right edge with a round leading end. */
.toast-root {
  right: 0;
}
.toast {
  border-radius: 22px 0 0 22px;
  padding-right: max(16px, env(safe-area-inset-right));
}
@media (max-width: 650px) {
  .toast-root {
    right: 0;
  }
}

/* Keep the video proportional; its window follows its own intrinsic dimensions. */
.capture-pip video {
  object-fit: contain;
}
/* Widen the native option popup while retaining a 44px pointer target. */
.capture-delay-control select {
  width: 140px;
  clip-path: inset(0 calc(100% - 44px) 0 0);
}
.capture-delay-control.is-pointer-focused:has(select:focus-visible) {
  outline: none;
  box-shadow: none;
}
@keyframes toast-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 1;
    transform: translateX(100%);
  }
}
.toast.is-leaving {
  animation: toast-slide-out 180ms ease-in both;
}
@media (prefers-reduced-motion: reduce) {
  .toast.is-leaving {
    animation: none;
  }
}

/* Keep the video playing while the picture-in-picture dimensions settle. */
.capture-pip.is-waiting::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #171a20;
  pointer-events: none;
}
.capture-pip::after {
  z-index: 2;
}

.capture-action .record-dot {
  pointer-events: none;
}

/* Give native delay options the same comfortable inset as other selects. */
.capture-delay-control select {
  padding-left: 12px;
}
.capture-delay-control option {
  padding: 6px 12px;
}

.capture-bottom {
  z-index: 2;
}
.capture-bottom .capture-delay-control {
  background: rgba(23, 34, 48, 0.82);
  color: #fff;
  border: 1px solid #ffffff38;
  backdrop-filter: blur(7px);
}
.capture-bottom .camera-toggle[data-action="stop-camera"] {
  color: #f3a0a5;
}
@media (max-width: 650px) {
  .capture-bottom .capture-delay-control {
    background: none;
    color: var(--ink);
    border-color: var(--rule);
    backdrop-filter: none;
  }
  .capture-bottom .camera-toggle[data-action="stop-camera"] {
    color: #c7646a;
  }
  :root[data-theme="dark"] .capture-bottom .camera-toggle[data-action="stop-camera"] {
    color: #f3a0a5;
  }
}
