/* SwimTech Technique Analysis
   This stylesheet is intentionally isolated from the legacy race-analysis UI. */

body:not(.auth-locked) .app-shell.technique-analysis-view {
  min-height: 100vh;
  padding: 0 0 36px 252px !important;
  background: #eef3f8;
}

body:not(.auth-locked) .app-shell.technique-analysis-view > .technique-analysis-page {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    radial-gradient(circle at 2% 0%, rgba(51, 153, 255, 0.11), transparent 28rem),
    linear-gradient(180deg, #f8fbfe 0, #eef3f8 26rem, #edf2f7 100%) !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.technique-analysis-root,
.technique-analysis-root * {
  box-sizing: border-box;
}

.technique-analysis-root {
  --sta-blue: #0875ea;
  --sta-blue-dark: #075fc0;
  --sta-blue-deep: #063b73;
  --sta-blue-soft: #eaf4ff;
  --sta-cyan: #4eb8f4;
  --sta-navy: #071d35;
  --sta-navy-2: #0b2948;
  --sta-ink: #0d2036;
  --sta-copy: #43566d;
  --sta-muted: #718197;
  --sta-line: #d8e3ed;
  --sta-line-strong: #bed1e1;
  --sta-surface: #ffffff;
  --sta-surface-soft: #f6f9fc;
  --sta-success: #07855e;
  --sta-success-soft: #e7f7f1;
  --sta-warning: #b66b05;
  --sta-warning-soft: #fff5df;
  --sta-danger: #d62d46;
  --sta-danger-soft: #fff0f2;
  --sta-shadow: 0 18px 45px rgba(22, 48, 76, 0.09);
  --sta-shadow-soft: 0 8px 24px rgba(22, 48, 76, 0.07);
  position: relative;
  min-width: 0;
  min-height: 100vh;
  color: var(--sta-ink);
  font-family: var(--app-font, Inter, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

.technique-analysis-root [hidden] {
  display: none !important;
}

.technique-analysis-root h1,
.technique-analysis-root h2,
.technique-analysis-root h3,
.technique-analysis-root p {
  margin-top: 0;
}

.technique-analysis-root button,
.technique-analysis-root input,
.technique-analysis-root select,
.technique-analysis-root textarea,
.technique-analysis-root summary {
  font: inherit;
  letter-spacing: 0;
}

.technique-analysis-root button,
.technique-analysis-root summary,
.technique-analysis-root select,
.technique-analysis-root input[type="range"],
.technique-analysis-root input[type="checkbox"],
.technique-analysis-root input[type="color"] {
  cursor: pointer;
}

.technique-analysis-root button:focus-visible,
.technique-analysis-root summary:focus-visible,
.technique-analysis-root input:focus-visible,
.technique-analysis-root select:focus-visible,
.technique-analysis-root textarea:focus-visible,
.technique-analysis-root canvas:focus-visible {
  outline: 3px solid rgba(8, 117, 234, 0.22);
  outline-offset: 2px;
}

.technique-analysis-root input,
.technique-analysis-root select,
.technique-analysis-root textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--sta-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sta-ink);
  padding: 9px 10px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.technique-analysis-root input:hover,
.technique-analysis-root select:hover,
.technique-analysis-root textarea:hover {
  border-color: var(--sta-line-strong);
}

.technique-analysis-root input:focus,
.technique-analysis-root select:focus,
.technique-analysis-root textarea:focus {
  border-color: var(--sta-blue);
  box-shadow: 0 0 0 3px rgba(8, 117, 234, 0.1);
  outline: none;
}

.technique-analysis-root textarea {
  min-height: 86px;
  resize: vertical;
}

.technique-analysis-root label {
  display: grid;
  gap: 6px;
  color: #34475d;
  font-size: 0.78rem;
  font-weight: 700;
}

.technique-analysis-root button {
  border: 0;
}

.sta-button,
.sta-icon-button,
.sta-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent !important;
  border-radius: 8px;
  font-weight: 700 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, color 130ms ease, box-shadow 130ms ease;
}

.sta-button {
  gap: 7px;
  padding: 8px 14px;
}

.sta-button:hover:not(:disabled),
.sta-icon-button:hover:not(:disabled),
.sta-tool-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.sta-button.primary,
.sta-tool-button.primary {
  border-color: var(--sta-blue) !important;
  background: linear-gradient(180deg, #1487f6 0%, var(--sta-blue) 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(8, 117, 234, 0.22);
}

.sta-button.primary:hover,
.sta-tool-button.primary:hover {
  background: var(--sta-blue-dark);
}

.sta-button.secondary {
  border-color: var(--sta-line) !important;
  background: #fff;
  color: #20364e;
  box-shadow: 0 2px 4px rgba(22, 48, 76, 0.03);
}

.sta-button.secondary:hover {
  border-color: #9ebbd2 !important;
  background: #f8fbfe;
  color: var(--sta-blue-dark);
}

.sta-button.danger,
.sta-icon-button.danger,
.sta-tool-button.danger {
  border-color: #f0c5cc !important;
  background: #fff;
  color: var(--sta-danger);
}

.sta-button.danger:hover,
.sta-icon-button.danger:hover,
.sta-tool-button.danger:hover {
  border-color: #e99eaa !important;
  background: var(--sta-danger-soft);
}

.sta-icon-button {
  width: 36px;
  flex: 0 0 36px;
  padding: 0;
  border-color: var(--sta-line) !important;
  background: #fff;
  color: #253d56;
  font-size: 1.15rem !important;
}

.sta-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--sta-blue);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Analysis library */
.sta-list-view {
  width: min(1460px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px clamp(20px, 3vw, 46px) 64px;
}

.sta-list-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.sta-list-header h1 {
  margin: 0 0 8px !important;
  color: var(--sta-navy) !important;
  font-size: clamp(2rem, 3.3vw, 3rem) !important;
  font-weight: 760;
  letter-spacing: -0.04em !important;
  line-height: 1 !important;
}

.sta-list-header p {
  max-width: 670px;
  margin-bottom: 0;
  color: var(--sta-copy);
  font-size: 0.98rem;
}

.sta-list-actions,
.sta-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sta-filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(145px, 0.9fr) repeat(3, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  border: 1px solid var(--sta-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--sta-shadow-soft);
  padding: 14px;
}

.sta-filter-bar input,
.sta-filter-bar select {
  min-height: 38px;
  background: var(--sta-surface-soft);
}

.sta-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(250px, 1fr));
  gap: 14px;
}

.sta-analysis-card {
  display: grid;
  grid-template-rows: 118px minmax(128px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sta-line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--sta-shadow-soft);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.sta-analysis-card:hover {
  transform: translateY(-2px);
  border-color: #b7d0e4;
  box-shadow: var(--sta-shadow);
}

.sta-card-preview {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  background:
    linear-gradient(135deg, rgba(48, 171, 243, 0.24), transparent 54%),
    linear-gradient(145deg, #082743, #06182d 68%, #071d34);
  color: #fff;
  padding: 16px;
}

.sta-card-preview > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #8ed7ff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.sta-card-preview small {
  max-width: 68%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-card-content {
  min-width: 0;
  padding: 16px 16px 10px;
}

.sta-card-content h2 {
  margin: 10px 0 5px;
  overflow: hidden;
  color: var(--sta-ink);
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-card-content p {
  margin-bottom: 12px;
  color: var(--sta-copy);
  font-size: 0.79rem;
  line-height: 1.45;
}

.sta-card-content > small {
  color: var(--sta-muted);
  font-size: 0.7rem;
}

.sta-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 99px;
  background: #edf2f7;
  color: #53657a;
  padding: 3px 9px;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sta-status.analyserad {
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

.sta-status.granskad {
  background: var(--sta-success-soft);
  color: var(--sta-success);
}

.sta-card-actions {
  justify-content: flex-end;
  border-top: 1px solid #e8eef4;
  padding: 10px 12px;
}

.sta-card-actions .sta-button {
  flex: 1 1 auto;
}

.sta-empty-card {
  display: grid;
  grid-column: 1 / -1;
  min-height: 330px;
  place-items: center;
  align-content: center;
  border: 1px dashed #abc4d9;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--sta-copy);
  padding: 42px;
  text-align: center;
}

.sta-empty-card > span {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--sta-blue-soft);
  color: var(--sta-blue);
  font-size: 1.8rem;
}

.sta-empty-card h2 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.sta-empty-card p {
  max-width: 510px;
  margin-bottom: 18px;
}

/* Analyzer shell */
.sta-editor {
  min-width: 0;
  min-height: 100vh;
  color: var(--sta-ink);
}

.sta-analyzer-header {
  position: sticky;
  top: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: 36px auto minmax(150px, 1fr) auto auto minmax(120px, auto) minmax(118px, auto) auto auto auto;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  border-bottom: 1px solid #d5e0ea;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 18px rgba(15, 39, 65, 0.06);
  padding: 10px 14px;
  backdrop-filter: blur(18px);
}

.sta-analysis-identity {
  display: grid;
  min-width: 130px;
}

.sta-analysis-identity input {
  min-height: 32px;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  padding: 4px 6px;
  color: var(--sta-navy);
  font-size: 0.92rem;
  font-weight: 750;
  text-overflow: ellipsis;
}

.sta-analysis-identity input:hover,
.sta-analysis-identity input:focus {
  border-color: var(--sta-line);
  background: #fff;
}

.sta-analysis-identity span {
  padding-left: 7px;
  color: var(--sta-muted);
  font-size: 0.63rem;
  font-weight: 650;
}

.sta-time-readout {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 6px;
  min-width: 135px;
  padding: 0 4px;
  font-variant-numeric: tabular-nums;
}

.sta-time-readout strong {
  color: var(--sta-navy);
  font-size: 1rem;
  font-weight: 800;
}

.sta-time-readout span {
  color: var(--sta-copy);
  font-size: 0.71rem;
}

.sta-time-readout small {
  grid-column: 1 / -1;
  color: var(--sta-muted);
  font-size: 0.61rem;
}

.sta-context-chip {
  display: grid;
  min-width: 0;
  border-left: 1px solid var(--sta-line);
  padding-left: 10px;
}

.sta-context-chip strong,
.sta-context-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-context-chip strong {
  color: #1c334b;
  font-size: 0.72rem;
}

.sta-context-chip span {
  color: var(--sta-muted);
  font-size: 0.62rem;
}

.sta-mode-toggle {
  display: flex !important;
  align-items: center;
  gap: 5px !important;
  white-space: nowrap;
}

.sta-mode-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sta-mode-toggle > span {
  color: var(--sta-muted);
  font-size: 0.63rem;
}

.sta-mode-toggle i {
  position: relative;
  width: 34px;
  height: 19px;
  flex: 0 0 34px;
  border-radius: 99px;
  background: #b9c6d3;
  transition: background 160ms ease;
}

.sta-mode-toggle i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 160ms ease;
}

.sta-mode-toggle input:checked + i {
  background: var(--sta-blue);
}

.sta-mode-toggle input:checked + i::after {
  transform: translateX(15px);
}

.technique-analysis-root .sta-status-select {
  display: grid;
  grid-template-columns: auto minmax(88px, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 118px;
  color: var(--sta-muted);
  font-size: 0.62rem;
  white-space: nowrap;
}

.technique-analysis-root .sta-status-select > span {
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.technique-analysis-root .sta-status-select > select {
  min-height: 32px;
  border-color: #cfdae4;
  border-radius: 7px;
  background-color: #f8fafc;
  padding: 5px 26px 5px 8px;
  color: #263e56;
  font-size: 0.67rem;
  font-weight: 750;
}

.sta-main-menu,
.sta-export-menu {
  position: relative;
}

.sta-main-menu summary,
.sta-export-menu summary {
  list-style: none;
}

.sta-main-menu summary::-webkit-details-marker,
.sta-export-menu summary::-webkit-details-marker {
  display: none;
}

.sta-main-menu summary::after,
.sta-export-menu summary::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.65rem;
}

.sta-menu-panel,
.sta-export-menu > div {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 80;
  display: grid;
  width: 238px;
  overflow: hidden;
  border: 1px solid var(--sta-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(10, 35, 60, 0.18);
  padding: 6px;
}

.sta-menu-panel {
  left: 0;
}

.sta-export-menu > div {
  right: 0;
  width: 128px;
}

.sta-menu-panel button,
.sta-export-menu > div button {
  width: 100%;
  border-radius: 6px;
  background: transparent;
  color: #223a53;
  padding: 8px 10px;
  text-align: left;
}

.sta-menu-panel button:hover,
.sta-export-menu > div button:hover {
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

.sta-editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px 0;
}

.sta-workspace {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cfdbe6;
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--sta-shadow-soft);
}

.sta-video-grid {
  display: grid;
  min-width: 0;
  background: #061221;
}

.sta-workspace.horizontal .sta-video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sta-workspace.vertical .sta-video-grid {
  grid-template-columns: 1fr;
}

.sta-video-pane {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid transparent;
  background: #071524;
  transition: border-color 140ms ease;
}

.sta-workspace.horizontal .sta-video-pane + .sta-video-pane {
  border-left: 1px solid rgba(167, 201, 228, 0.32);
}

.sta-workspace.vertical .sta-video-pane + .sta-video-pane {
  border-top: 1px solid rgba(167, 201, 228, 0.32);
}

.sta-video-pane.active {
  border-color: #269af0;
  box-shadow: inset 0 0 0 1px rgba(87, 191, 255, 0.28);
}

.sta-video-pane > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border-bottom: 1px solid rgba(171, 204, 229, 0.18);
  background: #0b243d;
  color: #eaf5ff;
  padding: 7px 10px;
}

.sta-video-pane > header > div {
  display: grid;
  min-width: 0;
}

.sta-video-pane > header strong,
.sta-video-pane > header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-video-pane > header strong {
  font-size: 0.72rem;
}

.sta-video-pane > header div span {
  color: #99b2c9;
  font-size: 0.6rem;
}

.sta-pane-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(109, 195, 255, 0.34);
  border-radius: 99px;
  background: rgba(37, 154, 240, 0.14);
  color: #8bd7ff !important;
  padding: 3px 7px;
  font-size: 0.57rem !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.technique-analysis-root .sta-video-pane > header > div {
  flex: 1 1 auto;
}

.technique-analysis-root .sta-pane-values {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 25px;
  border: 1px solid rgba(139, 207, 249, 0.24);
  border-radius: 99px;
  background: rgba(86, 174, 232, 0.09);
  color: #c8e5f8;
  padding: 3px 7px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.technique-analysis-root .sta-pane-values:hover,
.technique-analysis-root .sta-pane-values:focus-within {
  border-color: rgba(139, 215, 255, 0.46);
  background: rgba(86, 174, 232, 0.17);
  color: #eff9ff;
}

.technique-analysis-root .sta-pane-values > input {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin: 0;
  padding: 0;
  accent-color: var(--sta-cyan);
}

.sta-video-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: clamp(270px, 42vw, 690px);
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(36, 104, 157, 0.18), transparent 46%),
    #020812;
  touch-action: none;
  user-select: none;
}

.sta-workspace.horizontal .sta-video-stage {
  min-height: clamp(250px, 27vw, 490px);
}

.sta-workspace.vertical .sta-video-stage {
  min-height: clamp(230px, 25vw, 430px);
}

.sta-video-stage video,
.sta-video-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.sta-video-stage video {
  z-index: 1;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
}

.sta-video-stage canvas {
  z-index: 2;
  cursor: crosshair;
}

.sta-video-stage canvas[data-tool="select"] {
  cursor: default;
}

.sta-video-empty {
  position: relative;
  z-index: 3;
  display: grid;
  width: min(520px, 90%);
  place-items: center;
  color: #b9c8d7;
  padding: 36px 20px;
  text-align: center;
}

.sta-video-empty > span {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid rgba(105, 198, 255, 0.35);
  border-radius: 50%;
  background: rgba(36, 145, 222, 0.15);
  color: #7fcfff;
  font-size: 1.15rem;
}

.sta-relink-banner {
  position: relative;
  z-index: 5;
  display: grid;
  width: min(520px, calc(100% - 32px));
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 201, 40, 0.52);
  border-radius: 12px;
  background: rgba(7, 22, 37, 0.94);
  color: #f5fbff;
  padding: 18px;
  text-align: center;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
}

.sta-relink-banner strong {
  color: #ffd85d;
  font-size: 0.9rem;
}

.sta-relink-banner p {
  max-width: 54ch;
  margin: 0;
  color: #c9d8e5;
  font-size: 0.72rem;
  line-height: 1.45;
}

.sta-relink-banner > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.sta-video-empty h2 {
  margin-bottom: 6px;
  color: #f2f7fc;
  font-size: 1.15rem;
}

.sta-video-empty p {
  margin-bottom: 18px;
  color: #91a6ba;
  font-size: 0.78rem;
}

.sta-video-empty > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.sta-overlay-summary {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 10px;
  max-width: min(320px, 65%);
  border: 1px solid rgba(173, 215, 244, 0.22);
  border-radius: 7px;
  background: rgba(4, 18, 32, 0.82);
  color: #eaf6ff;
  padding: 5px 8px;
  font-size: 0.65rem;
  line-height: 1.35;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

.sta-overlay-summary:empty {
  display: none;
}

.sta-clip-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(166, 200, 226, 0.18);
  background: #142c43;
  color: #eff8ff;
  padding: 10px;
}

.sta-clip-info > div {
  display: grid;
  min-width: 0;
  gap: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
  padding: 7px;
}

.sta-clip-info > div span {
  color: #94aec3;
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sta-clip-info > div strong {
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-clip-info > p,
.sta-clip-info > .sta-button {
  grid-column: 1 / -1;
}

.sta-clip-info > p {
  margin: 7px 0 0;
  border-radius: 5px;
  padding: 7px 9px;
  font-size: 0.66rem;
}

.sta-clip-info .success {
  background: rgba(46, 190, 137, 0.14);
  color: #92efd0;
}

.sta-clip-info .warning {
  background: rgba(255, 185, 76, 0.12);
  color: #ffd997;
}

/* Timeline and transport */
.sta-transport {
  border-top: 1px solid #d5e0ea;
  background: #fff;
  padding: 9px 11px 10px;
}

.sta-active-tool {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  border: 1px solid #b9d9f2;
  border-radius: 7px;
  background: var(--sta-blue-soft);
  color: var(--sta-blue-deep);
  padding: 6px 8px;
  font-size: 0.7rem;
  font-weight: 700;
}

.sta-active-tool > span {
  flex: 1 1 auto;
}

.sta-active-tool button {
  border-radius: 5px;
  background: #fff;
  color: var(--sta-blue-dark);
  padding: 4px 8px;
  font-size: 0.65rem;
  font-weight: 750;
}

.sta-progress-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 20px;
  min-height: 20px;
  margin: 4px 0 6px;
  padding: 0;
}

.sta-progress-wrap input[type="range"] {
  position: relative;
  z-index: 4;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  height: 14px;
  margin: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
  padding: 0;
  accent-color: var(--sta-blue);
  appearance: none;
}

.technique-analysis-root .sta-progress-wrap input[type="range"]:focus-visible {
  outline: 0;
  outline-offset: 0;
  box-shadow: inset 0 0 0 1px rgba(8, 117, 234, 0.3);
}

.sta-progress-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: #cad8e4;
}

.sta-progress-wrap input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--sta-blue);
  box-shadow: 0 1px 5px rgba(8, 59, 110, 0.36);
  appearance: none;
}

.sta-timeline-markers {
  position: absolute;
  inset: 50% 7px auto;
  z-index: 3;
  height: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.sta-timeline-markers i,
.sta-time-zero-marker {
  position: absolute;
  top: 2px;
  width: 3px;
  height: 11px;
  border-radius: 99px;
  transform: translateX(-50%);
}

.sta-timeline-markers i.object {
  background: #ffc928;
}

.sta-timeline-markers i.comment {
  background: #9b6cff;
}

.sta-timeline-markers i.event {
  background: #11b78a;
}

.sta-time-zero-marker {
  z-index: 5;
  top: 0;
  height: 16px;
  background: #ef405a;
  pointer-events: none;
}

.sta-transport-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sta-playback-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.sta-tool-button {
  min-width: 36px;
  min-height: 34px;
  border-color: #cfdae4 !important;
  background: #f8fafc;
  color: #233b54;
  padding: 6px 8px;
}

.sta-tool-button:hover:not(:disabled) {
  border-color: #9fc2dd !important;
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

.sta-tool-button.selected {
  border-color: var(--sta-blue) !important;
  background: var(--sta-blue);
  color: #fff;
  box-shadow: 0 5px 12px rgba(8, 117, 234, 0.2);
}

.sta-tool-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.3);
  opacity: 0.42;
}

.sta-tool-button.compact {
  min-width: 32px;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 0.69rem;
}

.sta-transport-row > label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  white-space: nowrap;
}

.sta-transport-row > label select {
  width: 72px;
  min-height: 32px;
  padding: 5px 6px;
  font-size: 0.67rem;
}

.technique-analysis-root .sta-transport-row > .sta-sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid #d6e1ea;
  border-radius: 7px;
  background: #f8fafc;
  color: #496077;
  padding: 5px 8px;
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.2;
}

.technique-analysis-root .sta-transport-row > .sta-sync-toggle:hover,
.technique-analysis-root .sta-transport-row > .sta-sync-toggle:focus-within {
  border-color: #a9cbe4;
  background: #f1f8fe;
  color: var(--sta-blue-dark);
}

.technique-analysis-root .sta-sync-toggle > input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin: 0;
  padding: 0;
  accent-color: var(--sta-blue);
}

.technique-analysis-root .sta-sync-toggle:has(input:checked) {
  border-color: #acd2ef;
  background: var(--sta-blue-soft);
  color: var(--sta-blue-deep);
}

.sta-transport-row > .sta-button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 0.67rem;
}

.sta-zoom-controls {
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid #cfdbe5;
  border-radius: 7px;
}

.sta-zoom-controls button {
  min-width: 28px;
  min-height: 30px;
  border-left: 1px solid #dbe4ec;
  background: #fff;
  color: #294158;
  padding: 4px 7px;
  font-size: 0.68rem;
  font-weight: 750;
}

.sta-zoom-controls button:first-child {
  border-left: 0;
}

.sta-zoom-controls button:hover {
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

.sta-distance-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
}

.sta-distance-presets > span {
  margin-right: 2px;
  color: var(--sta-muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sta-distance-presets button {
  min-width: 29px;
  min-height: 25px;
  border: 1px solid #d5e0e9;
  border-radius: 6px;
  background: #f8fafc;
  color: #354c63;
  padding: 3px 6px;
  font-size: 0.63rem;
  font-weight: 750;
}

.sta-distance-presets button:hover {
  border-color: #9bc3df;
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

/* Tool rail */
.sta-tool-rail {
  position: sticky;
  top: 76px;
  display: flex;
  max-height: calc(100vh - 90px);
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sta-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--sta-shadow-soft);
}

.sta-tool-rail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid #e1e9f0;
  background: linear-gradient(180deg, #fbfdff, #f5f8fb);
  padding: 8px 10px 8px 12px;
}

.sta-tool-rail > header > div {
  display: grid;
}

.sta-tool-rail > header strong {
  font-size: 0.77rem;
}

.sta-tool-rail > header span {
  color: var(--sta-muted);
  font-size: 0.61rem;
}

.sta-tool-rail > header button {
  width: 27px;
  height: 27px;
  border-radius: 6px;
  background: transparent;
  color: var(--sta-muted);
  font-size: 1rem;
}

.sta-tool-rail > header button:hover {
  background: #eaf1f7;
  color: var(--sta-navy);
}

.sta-tool-groups {
  min-height: 0;
  overflow: auto;
  padding: 5px 8px 8px;
  scrollbar-color: #c2d0dc transparent;
  scrollbar-width: thin;
}

.sta-tool-groups details {
  border-bottom: 1px solid #e8eef4;
}

.sta-tool-groups summary {
  position: relative;
  list-style: none;
  color: #354b62;
  padding: 9px 20px 8px 3px;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sta-tool-groups summary::-webkit-details-marker {
  display: none;
}

.sta-tool-groups summary::after {
  content: "+";
  position: absolute;
  top: 8px;
  right: 4px;
  color: #71869a;
}

.sta-tool-groups details[open] summary::after {
  content: "−";
}

.sta-tool-groups details > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding-bottom: 9px;
}

.sta-tool-groups .sta-tool-button {
  display: grid;
  min-width: 0;
  min-height: 47px;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-radius: 7px;
  padding: 5px 3px;
  white-space: normal;
}

.sta-tool-groups .sta-tool-button > span {
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-tool-groups .sta-tool-button > b {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-calibration-status {
  display: grid;
  gap: 4px;
  margin: 0 8px 8px;
  border: 1px solid;
  border-radius: 8px;
  padding: 9px;
}

.sta-calibration-status strong {
  font-size: 0.7rem;
}

.sta-calibration-status span {
  font-size: 0.61rem;
  line-height: 1.35;
}

.sta-calibration-status button {
  justify-self: start;
  margin-top: 3px;
  border-radius: 5px;
  background: #fff;
  padding: 4px 7px;
  font-size: 0.61rem;
  font-weight: 750;
}

.sta-calibration-status.valid {
  border-color: #a8dfcc;
  background: var(--sta-success-soft);
  color: #087052;
}

.sta-calibration-status.valid button {
  color: #087052;
}

.sta-calibration-status.missing {
  border-color: #f2d8a5;
  background: var(--sta-warning-soft);
  color: #8e590b;
}

.sta-calibration-status.missing button {
  color: #8e590b;
}

.sta-editor.tools-hidden .sta-editor-body,
.sta-editor.feedback-mode .sta-editor-body {
  grid-template-columns: minmax(0, 1fr);
}

.sta-editor.tools-hidden .sta-tool-rail,
.sta-editor.feedback-mode .sta-tool-rail {
  display: none;
}

/* Results, events and feedback */
.sta-lower-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.82fr) minmax(0, 1.03fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px 44px;
}

.sta-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sta-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--sta-shadow-soft);
}

.sta-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid #e3eaf1;
  padding: 10px 12px;
}

.sta-panel > header h2 {
  margin: 0;
  color: #183049;
  font-size: 0.9rem;
}

.sta-panel > header > span,
.sta-panel > header > button {
  border-radius: 99px;
  background: #eef4f9;
  color: #536980;
  padding: 4px 8px;
  font-size: 0.61rem;
  font-weight: 750;
}

.sta-panel > header > button:hover {
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

.technique-analysis-root .sta-template-guide {
  margin: 10px 10px 0;
  overflow: hidden;
  border: 1px solid #d5e5f1;
  border-radius: 8px;
  background: #f7fbff;
}

.technique-analysis-root .sta-template-guide > summary {
  position: relative;
  list-style: none;
  color: #31516e;
  padding: 8px 28px 8px 10px;
  font-size: 0.64rem;
  font-weight: 800;
}

.technique-analysis-root .sta-template-guide > summary::-webkit-details-marker {
  display: none;
}

.technique-analysis-root .sta-template-guide > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--sta-blue);
  font-size: 0.84rem;
  transform: translateY(-50%);
}

.technique-analysis-root .sta-template-guide[open] > summary {
  border-bottom: 1px solid #dce8f1;
  background: #eef7ff;
  color: var(--sta-blue-deep);
}

.technique-analysis-root .sta-template-guide[open] > summary::after {
  content: "-";
}

.technique-analysis-root .sta-template-guide > p {
  margin: 0;
  color: #536b82;
  padding: 9px 10px 10px;
  font-size: 0.64rem;
  line-height: 1.5;
}

.technique-analysis-root .sta-analysis-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px 2px;
}

.technique-analysis-root .sta-analysis-cards > label {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.technique-analysis-root .sta-analysis-cards input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.technique-analysis-root .sta-analysis-cards span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid #d3e0ea;
  border-radius: 99px;
  background: #fff;
  color: #4a6076;
  padding: 4px 8px;
  font-size: 0.59rem;
  font-weight: 750;
  line-height: 1.15;
  transition: border-color 130ms ease, background 130ms ease, color 130ms ease, box-shadow 130ms ease;
}

.technique-analysis-root .sta-analysis-cards label:hover span {
  border-color: #9fc6e2;
  background: #f4f9fd;
  color: var(--sta-blue-dark);
}

.technique-analysis-root .sta-analysis-cards input:checked + span {
  border-color: #8fc4e9;
  background: var(--sta-blue-soft);
  color: var(--sta-blue-deep);
  box-shadow: inset 0 0 0 1px rgba(8, 117, 234, 0.06);
}

.technique-analysis-root .sta-analysis-cards input:focus-visible + span {
  outline: 3px solid rgba(8, 117, 234, 0.22);
  outline-offset: 2px;
}

.sta-empty-copy {
  margin: 0;
  color: var(--sta-muted);
  padding: 20px 14px;
  font-size: 0.73rem;
  line-height: 1.5;
  text-align: center;
}

.sta-measurement-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: stretch;
  border-bottom: 1px solid #e8eef4;
}

.sta-measurement-row:last-child {
  border-bottom: 0;
}

.sta-measurement-row > button:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
  background: transparent;
  color: var(--sta-copy);
  padding: 10px 12px;
  text-align: left;
}

.sta-measurement-row > button:first-child:hover {
  background: #f6faff;
}

.sta-measurement-row span,
.sta-measurement-row strong,
.sta-measurement-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-measurement-row span {
  color: var(--sta-blue-dark);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sta-measurement-row strong {
  color: #132b43;
  font-size: 0.8rem;
}

.sta-measurement-row small {
  color: var(--sta-muted);
  font-size: 0.6rem;
}

.sta-measurement-row > button:last-child {
  background: transparent;
  color: #98a6b5;
  font-size: 1rem;
}

.sta-measurement-row > button:last-child:hover {
  background: var(--sta-danger-soft);
  color: var(--sta-danger);
}

.technique-analysis-root .sta-measurement-row > div {
  min-width: 0;
}

.technique-analysis-root .sta-measurement-row > div > button:first-child {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 2px;
  background: transparent;
  color: var(--sta-copy);
  padding: 10px 12px;
  text-align: left;
}

.technique-analysis-root .sta-measurement-row > div > button:first-child:hover {
  background: #f6faff;
}

.technique-analysis-root .sta-segment-details {
  margin: 0 10px 10px;
  overflow: hidden;
  border: 1px solid #d9e5ee;
  border-radius: 8px;
  background: #f8fbfe;
}

.technique-analysis-root .sta-segment-details > summary {
  position: relative;
  list-style: none;
  color: #2c4a65;
  padding: 7px 28px 7px 9px;
  font-size: 0.63rem;
  font-weight: 800;
}

.technique-analysis-root .sta-segment-details > summary::-webkit-details-marker {
  display: none;
}

.technique-analysis-root .sta-segment-details > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 9px;
  color: var(--sta-blue);
  font-size: 0.82rem;
  transform: translateY(-50%);
}

.technique-analysis-root .sta-segment-details[open] > summary {
  border-bottom: 1px solid #e0e9f0;
  background: #f0f7fd;
  color: var(--sta-blue-deep);
}

.technique-analysis-root .sta-segment-details[open] > summary::after {
  content: "-";
}

.technique-analysis-root .sta-segment-details > svg {
  display: block;
  width: calc(100% - 18px);
  height: 78px;
  margin: 9px;
  border: 1px solid #e2ebf2;
  border-radius: 6px;
  background: #fff;
  padding: 7px;
}

.technique-analysis-root .sta-segment-details > svg path {
  fill: none;
  stroke: #cad8e4;
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.technique-analysis-root .sta-segment-details > svg polyline {
  fill: none;
  stroke: var(--sta-blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.technique-analysis-root .sta-segment-details > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 5px;
  max-height: 154px;
  overflow: auto;
  padding: 0 9px 9px;
  scrollbar-color: #c2d0dc transparent;
  scrollbar-width: thin;
}

.technique-analysis-root .sta-segment-details > div > button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 1px 5px;
  min-width: 0;
  border: 1px solid #dbe6ee;
  border-radius: 6px;
  background: #fff;
  color: #29445d;
  padding: 6px;
  text-align: left;
}

.technique-analysis-root .sta-segment-details > div > button:hover {
  border-color: #9fc7e4;
  background: var(--sta-blue-soft);
}

.technique-analysis-root .sta-segment-details > div > button > b {
  grid-row: 1 / 3;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #e8f3fc;
  color: var(--sta-blue-dark);
  font-size: 0.56rem;
}

.technique-analysis-root .sta-segment-details > div > button > span,
.technique-analysis-root .sta-segment-details > div > button > small {
  overflow: hidden;
  color: #29445d;
  font-size: 0.61rem;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.technique-analysis-root .sta-segment-details > div > button > small {
  color: var(--sta-muted);
  font-size: 0.55rem;
  font-weight: 650;
}

.technique-analysis-root .sta-segment-details > p {
  margin: 0;
  border-top: 1px solid #e1eaf1;
  color: var(--sta-muted);
  padding: 7px 9px;
  font-size: 0.57rem;
  line-height: 1.4;
}

.sta-event-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 10px 6px;
}

.sta-event-chips button {
  border: 1px solid #ccdae6;
  border-radius: 99px;
  background: #f8fafc;
  color: #3b536b;
  padding: 5px 8px;
  font-size: 0.61rem;
  font-weight: 700;
}

.sta-event-chips button:hover {
  border-color: #91bddd;
  background: var(--sta-blue-soft);
  color: var(--sta-blue-dark);
}

.sta-event-list {
  max-height: 228px;
  margin: 0;
  overflow: auto;
  padding: 4px 10px 10px;
  list-style: none;
}

.sta-event-list li {
  border-top: 1px solid #e8eef4;
}

.sta-event-list li:first-child {
  border-top: 0;
}

.sta-event-list button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  color: #2a4159;
  padding: 8px 3px;
  font-size: 0.69rem;
  text-align: left;
}

.sta-event-list button:hover {
  color: var(--sta-blue-dark);
}

.sta-event-list button span {
  color: var(--sta-muted);
  font-size: 0.59rem;
  white-space: nowrap;
}

.sta-event-list .empty {
  color: var(--sta-muted);
  padding: 16px 4px;
  font-size: 0.69rem;
  text-align: center;
}

.sta-comments-panel form {
  display: grid;
  gap: 7px;
  border-bottom: 1px solid #e5ecf2;
  padding: 10px;
}

.sta-comments-panel form textarea {
  min-height: 62px;
  padding: 8px;
  font-size: 0.7rem;
}

.sta-comments-panel form > div {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1.25fr;
  gap: 5px;
}

.sta-comments-panel form select,
.sta-comments-panel form .sta-button {
  min-height: 31px;
  padding: 5px 7px;
  font-size: 0.61rem;
}

.sta-comment-list {
  max-height: 250px;
  overflow: auto;
  padding: 5px 10px 10px;
}

.sta-comment-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25px;
  overflow: hidden;
  margin-top: 6px;
  border: 1px solid #dce6ee;
  border-left: 3px solid #7b91a7;
  border-radius: 7px;
}

.sta-comment-list article.förbättring,
.sta-comment-list article.forbattring {
  border-left-color: #e69a20;
}

.sta-comment-list article.styrka {
  border-left-color: #0eaa79;
}

.sta-comment-list article > button:first-child {
  display: grid;
  min-width: 0;
  gap: 2px;
  background: #fff;
  color: #263e55;
  padding: 8px;
  text-align: left;
}

.sta-comment-list article > button:first-child:hover {
  background: #f7fbff;
}

.sta-comment-list article strong {
  color: var(--sta-blue-dark);
  font-size: 0.62rem;
}

.sta-comment-list article span {
  overflow: hidden;
  font-size: 0.7rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-comment-list article small {
  color: var(--sta-muted);
  font-size: 0.58rem;
}

.sta-comment-list article > button:last-child {
  background: #f9fbfd;
  color: #9aa9b7;
}

.sta-comment-list article > button:last-child:hover {
  background: var(--sta-danger-soft);
  color: var(--sta-danger);
}

.sta-editor.feedback-mode .sta-lower-panels {
  grid-template-columns: minmax(0, 760px);
  justify-content: end;
}

.sta-editor.feedback-mode .sta-measurements-panel,
.sta-editor.feedback-mode .sta-events-panel {
  display: none;
}

/* Floating object inspector */
.sta-inspector {
  position: fixed;
  top: 82px;
  right: 278px;
  z-index: 72;
  width: min(310px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #c8d7e4;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(10, 35, 60, 0.24);
  padding: 12px;
  backdrop-filter: blur(16px);
}

.sta-inspector > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -12px -12px 11px;
  border-bottom: 1px solid #e1e8ef;
  background: #f6f9fc;
  padding: 10px 12px;
}

.sta-inspector > header strong {
  font-size: 0.77rem;
}

.sta-inspector > header button {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: transparent;
  color: var(--sta-muted);
}

.sta-inspector > header button:hover {
  background: #e8f0f7;
  color: var(--sta-ink);
}

.sta-inspector > label {
  margin-bottom: 9px;
}

.sta-inspector-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}

.sta-inspector-grid input {
  min-height: 34px;
  padding: 6px 7px;
  font-size: 0.72rem;
}

.sta-inspector-grid input[type="color"] {
  padding: 3px;
}

.sta-inspector-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
  border: 1px solid #e0e8ef;
  border-radius: 7px;
  background: #f8fafc;
  padding: 8px;
}

.sta-inspector-checks label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 650;
}

.sta-inspector-checks input {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  padding: 0;
}

.technique-analysis-root .sta-trajectory-inspector {
  display: grid;
  gap: 8px;
  margin: 11px 0 10px;
  border: 1px solid #d8e4ed;
  border-radius: 8px;
  background: #f7fafc;
  padding: 10px;
}

.technique-analysis-root .sta-trajectory-inspector > strong {
  color: #173c5c;
  font-size: 0.7rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.technique-analysis-root .sta-trajectory-inspector > label {
  gap: 4px;
  color: #425a70;
  font-size: 0.64rem;
}

.technique-analysis-root .sta-trajectory-inspector select,
.technique-analysis-root .sta-trajectory-inspector input {
  min-height: 32px;
  padding: 6px 7px;
  font-size: 0.66rem;
}

.technique-analysis-root .sta-phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid #e0e8ef;
  padding-top: 8px;
}

.technique-analysis-root .sta-phase-grid > label {
  gap: 3px;
  color: #64798d;
  font-size: 0.58rem;
}

.technique-analysis-root .sta-phase-grid input {
  background: #fff;
}

.technique-analysis-root .sta-trajectory-inspector > small {
  color: #697d90;
  font-size: 0.57rem;
  line-height: 1.45;
}

.sta-inspector footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  border-top: 1px solid #e1e8ef;
  margin-top: 3px;
  padding-top: 10px;
}

/* Modal layer, wizard and pickers */
.technique-analysis-root [data-sta-modal-layer]:not(:empty) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(2, 14, 28, 0.64);
  padding: 24px;
  backdrop-filter: blur(5px);
}

.sta-dialog[open] {
  position: relative;
  inset: auto;
  display: block;
  width: min(700px, calc(100vw - 36px));
  max-height: min(820px, calc(100vh - 40px));
  margin: auto;
  overflow: auto;
  border: 1px solid #c9d8e5;
  border-radius: 14px;
  background: #fff;
  color: var(--sta-ink);
  box-shadow: 0 32px 90px rgba(0, 16, 34, 0.35);
  padding: 0;
}

.sta-dialog.sta-wizard {
  width: min(850px, calc(100vw - 36px));
}

.sta-dialog.sta-small-dialog {
  width: min(500px, calc(100vw - 36px));
}

.sta-dialog.sta-shortcuts-dialog {
  width: min(610px, calc(100vw - 36px));
}

.sta-dialog::backdrop {
  background: transparent;
}

.sta-dialog > header,
.sta-dialog > form > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border-bottom: 1px solid #e1e9f0;
  background: rgba(255, 255, 255, 0.97);
  padding: 14px 18px;
  backdrop-filter: blur(14px);
}

.sta-dialog header h2 {
  margin: 0;
  color: var(--sta-navy);
  font-size: 1.18rem;
  line-height: 1.2;
}

.sta-dialog header > button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 7px;
  background: #eff4f8;
  color: #52677d;
  font-size: 1.2rem;
}

.sta-dialog header > button:hover {
  background: #e3edf5;
  color: var(--sta-navy);
}

.sta-dialog > p,
.sta-dialog > form > p,
.sta-dialog > form > label {
  margin: 14px 18px 0;
}

.sta-dialog > p,
.sta-dialog > form > p {
  color: var(--sta-copy);
  font-size: 0.78rem;
  line-height: 1.55;
}

.sta-dialog > footer,
.sta-dialog > form > footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  border-top: 1px solid #e1e9f0;
  background: rgba(248, 251, 253, 0.97);
  padding: 12px 18px;
  backdrop-filter: blur(14px);
}

.sta-wizard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
  padding: 18px;
}

.sta-wizard-grid .wide {
  grid-column: 1 / -1;
}

.sta-warning-copy {
  border: 1px solid #f1d59f;
  border-radius: 7px;
  background: var(--sta-warning-soft);
  color: #87540a !important;
  padding: 9px 10px;
}

.sta-video-library {
  display: grid;
  gap: 7px;
  max-height: min(540px, calc(100vh - 190px));
  overflow: auto;
  padding: 12px 18px;
}

.sta-video-library article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dde6ee;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px;
}

.sta-video-library article > div {
  display: grid;
  min-width: 0;
}

.sta-video-library strong,
.sta-video-library span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sta-video-library strong {
  color: #1b334b;
  font-size: 0.75rem;
}

.sta-video-library span {
  color: var(--sta-muted);
  font-size: 0.63rem;
}

.sta-shortcuts-dialog dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: #e5ecf2;
  padding: 1px;
}

.sta-shortcuts-dialog dl > div {
  display: grid;
  grid-template-columns: minmax(74px, auto) 1fr;
  align-items: center;
  gap: 9px;
  background: #fff;
  padding: 9px 12px;
}

.sta-shortcuts-dialog dt {
  justify-self: start;
  border: 1px solid #ccd9e4;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f6f9fb;
  color: #28415a;
  padding: 3px 6px;
  font-size: 0.63rem;
  font-weight: 800;
}

.sta-shortcuts-dialog dd {
  margin: 0;
  color: var(--sta-copy);
  font-size: 0.67rem;
}

/* Status toast */
.sta-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  width: min(400px, calc(100vw - 36px));
  border: 1px solid #bfd2e2;
  border-left: 4px solid var(--sta-blue);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.98);
  color: #253d55;
  box-shadow: 0 18px 50px rgba(7, 29, 53, 0.22);
  padding: 11px 13px;
  font-size: 0.73rem;
  font-weight: 650;
  line-height: 1.45;
  backdrop-filter: blur(12px);
}

.sta-toast[data-tone="success"] {
  border-left-color: var(--sta-success);
  background: #f5fffb;
  color: #086348;
}

.sta-toast[data-tone="error"] {
  border-left-color: var(--sta-danger);
  background: #fff8f9;
  color: #9d2237;
}

/* Compact desktop states */
@media (max-width: 1390px) {
  .sta-analyzer-header {
    grid-template-columns: 36px auto minmax(130px, 1fr) auto minmax(118px, auto) auto auto auto;
  }

  .sta-analyzer-header .sta-context-chip,
  .sta-analyzer-header > [data-sta-action="toggle-clip-info"] {
    display: none;
  }

  .sta-inspector {
    right: 20px;
  }

  .sta-lower-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sta-comments-panel {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1181px) and (max-width: 1265px) {
  .sta-analyzer-header {
    grid-template-areas:
      "back menu identity identity save export"
      "back menu time status mode mode";
    grid-template-columns: 36px auto minmax(150px, 1fr) minmax(118px, auto) auto auto;
    gap: 5px 8px;
    min-height: 94px;
  }

  .sta-analyzer-header > .sta-icon-button {
    grid-area: back;
    align-self: center;
  }

  .sta-analyzer-header > .sta-main-menu {
    grid-area: menu;
  }

  .sta-analyzer-header > .sta-analysis-identity {
    grid-area: identity;
  }

  .sta-analyzer-header > .sta-time-readout {
    grid-area: time;
  }

  .sta-analyzer-header > .sta-status-select {
    grid-area: status;
  }

  .sta-analyzer-header > .sta-mode-toggle {
    grid-area: mode;
    justify-self: end;
  }

  .sta-analyzer-header > [data-sta-action="save"] {
    grid-area: save;
  }

  .sta-analyzer-header > .sta-export-menu {
    grid-area: export;
  }

  .sta-tool-rail {
    top: 106px;
    max-height: calc(100vh - 120px);
  }

  .sta-inspector {
    top: 106px;
  }
}

@media (max-width: 1180px) {
  .sta-list-view {
    padding-right: 24px;
    padding-left: 24px;
  }

  .sta-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sta-analysis-grid {
    grid-template-columns: repeat(2, minmax(235px, 1fr));
  }

  .sta-analyzer-header {
    grid-template-columns: 36px auto minmax(120px, 1fr) auto minmax(118px, auto) auto auto;
    gap: 6px;
  }

  .sta-analyzer-header .sta-mode-toggle {
    display: none !important;
  }

  .sta-editor-body {
    grid-template-columns: minmax(0, 1fr) 222px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .sta-tool-groups details > div {
    grid-template-columns: 1fr;
  }

  .sta-tool-groups .sta-tool-button {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 36px;
    justify-items: start;
    padding: 5px 8px;
  }

  .sta-tool-groups .sta-tool-button > b {
    font-size: 0.61rem;
  }

  .sta-video-stage {
    min-height: clamp(250px, 39vw, 530px);
  }

  .sta-transport-row {
    flex-wrap: wrap;
  }

  .sta-zoom-controls {
    margin-left: 0;
  }

  .sta-lower-panels {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 1040px) {
  .sta-analyzer-header {
    grid-template-columns: 36px auto minmax(110px, 1fr) minmax(118px, auto) auto auto;
  }

  .sta-analyzer-header .sta-time-readout {
    display: none;
  }

  .sta-analysis-grid {
    grid-template-columns: 1fr;
  }

  .sta-card-preview {
    min-height: 100px;
  }

  .sta-editor-body {
    grid-template-columns: minmax(0, 1fr) 198px;
  }

  .sta-tool-rail {
    top: 73px;
  }

  .sta-lower-panels {
    grid-template-columns: 1fr;
  }

  .sta-comments-panel {
    grid-column: auto;
  }
}

/* Sidebar switches to its mobile presentation below the app breakpoint. */
@media (max-width: 980px) {
  body:not(.auth-locked) .app-shell.technique-analysis-view {
    padding: 0 0 82px !important;
  }

  .sta-list-view {
    padding-top: 24px;
  }

  .sta-editor-body {
    grid-template-columns: minmax(0, 1fr) 218px;
  }

  .sta-inspector {
    top: 74px;
    right: 14px;
  }
}

@media (max-width: 760px) {
  .sta-list-header {
    align-items: stretch;
    flex-direction: column;
  }

  .sta-list-actions .sta-button {
    flex: 1 1 0;
  }

  .sta-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sta-analyzer-header {
    position: relative;
    grid-template-columns: 36px auto minmax(110px, 1fr) auto;
  }

  .sta-analyzer-header > .sta-button,
  .sta-analyzer-header > .sta-export-menu {
    display: none;
  }

  .sta-editor-body {
    grid-template-columns: 1fr;
  }

  .sta-tool-rail {
    position: relative;
    top: auto;
    max-height: none;
  }

  .sta-tool-groups {
    max-height: 370px;
  }

  .sta-tool-groups details > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sta-tool-groups .sta-tool-button {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .sta-workspace.horizontal .sta-video-grid {
    grid-template-columns: 1fr;
  }

  .sta-workspace.horizontal .sta-video-pane + .sta-video-pane {
    border-top: 1px solid rgba(167, 201, 228, 0.32);
    border-left: 0;
  }

  .sta-video-stage,
  .sta-workspace.horizontal .sta-video-stage,
  .sta-workspace.vertical .sta-video-stage {
    min-height: 260px;
  }

  .sta-playback-buttons {
    order: -2;
    width: 100%;
    justify-content: center;
  }

  .sta-distance-presets {
    overflow-x: auto;
  }

  .sta-clip-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sta-inspector {
    top: 12px;
    right: 12px;
  }

  .sta-wizard-grid,
  .sta-shortcuts-dialog dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .sta-list-view {
    padding: 20px 12px 46px;
  }

  .sta-list-header h1 {
    font-size: 2rem !important;
  }

  .sta-filter-bar {
    grid-template-columns: 1fr;
  }

  .sta-analysis-card {
    grid-template-rows: 96px auto auto;
  }

  .sta-analyzer-header {
    grid-template-columns: 36px auto minmax(90px, 1fr);
    padding-right: 8px;
    padding-left: 8px;
  }

  .sta-analyzer-header .sta-analysis-identity {
    display: none;
  }

  .sta-editor-body,
  .sta-lower-panels {
    padding-right: 6px;
    padding-left: 6px;
  }

  .sta-video-stage,
  .sta-workspace.horizontal .sta-video-stage,
  .sta-workspace.vertical .sta-video-stage {
    min-height: 215px;
  }

  .sta-video-pane > header {
    min-height: 35px;
  }

  .sta-transport-row > label,
  .sta-transport-row > .sta-button {
    flex: 1 1 auto;
  }

  .sta-tool-button.compact {
    flex: 1 1 31px;
  }

  .sta-comments-panel form > div {
    grid-template-columns: 1fr;
  }

  .sta-dialog[open],
  .sta-dialog.sta-wizard,
  .sta-dialog.sta-small-dialog,
  .sta-dialog.sta-shortcuts-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .technique-analysis-root [data-sta-modal-layer]:not(:empty) {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .technique-analysis-root *,
  .technique-analysis-root *::before,
  .technique-analysis-root *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
