@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;650;750;800;850&display=swap");

:root {
  --bg: #222222;
  --panel: #2b2b2b;
  --panel-strong: #333333;
  --field: #252525;
  --field-hover: #3a3a3a;
  --line: #484848;
  --line-strong: #5c5c5c;
  --text: #ffffff;
  --muted: #c5c5c5;
  --accent: #ffffff;
  --accent-2: #d8d8d8;
  --signal: #f2d34f;
  --signal-soft: rgba(242, 211, 79, 0.16);
  --danger: #ffffff;
  --shadow: none;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  border-radius: var(--radius) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  color: var(--text);
  background: #2f2f2f;
  font-size: 13px;
  line-height: 1.25;
}

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

button,
.source-button,
.download-link {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  min-height: 34px;
  padding: 7px 11px;
  font-weight: 750;
  cursor: pointer;
}

.danger-button {
  border-color: var(--line);
  background: var(--field);
  color: #ffffff;
}

.danger-inline-button {
  color: #ffb8b8;
}

.danger-inline-button:hover {
  border-color: #ffb8b8;
  color: #ffffff;
}

button:hover,
.source-button:hover,
.download-link:hover,
.danger-button:hover {
  border-color: #ffffff;
  background: var(--field-hover);
}

button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.primary-button {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.primary-button:hover {
  background: #ffffff;
  color: #000000;
}

.primary-button.processing,
.secondary-button.processing {
  position: relative;
  overflow: hidden;
  opacity: 0.88;
}

.primary-button.processing::after,
.secondary-button.processing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  animation: processingSweep 1.1s linear infinite;
}

.secondary-button,
.ghost-button {
  background: var(--field);
}

.graph-button {
  border-color: #ffffff;
  background: var(--field);
  color: #ffffff;
}

.hidden,
.hidden-controls {
  display: none !important;
}

img,
video,
canvas {
  filter: none !important;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(340px, 420px);
  gap: 14px;
  height: 100dvh;
  padding: 58px 26px 14px;
  overflow: hidden;
  background: #2f2f2f;
}

.top-detection-pill {
  position: absolute;
  top: 28px;
  right: 26px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.top-detection-pill span {
  display: inline-grid;
  place-items: center;
  min-height: 24px;
  padding: 0 7px;
  background: #4d85e5;
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.source-panel,
.video-panel,
.side-panel {
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.source-panel,
.preview-card,
.chat-card,
.video-stage,
.timeline-card,
.capture-strip {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.source-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow: auto;
}

.analysis-status {
  min-height: 32px;
  margin-top: 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  padding: 8px 9px;
  overflow-wrap: anywhere;
}

.analysis-status.compact {
  min-height: 30px;
}

.analysis-status.running {
  border-color: #f2d34f;
  color: #ffffff;
}

.analysis-status.running::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px !important;
  background: #f2d34f;
  animation: statusPulse 0.9s ease-in-out infinite;
}

.analysis-status.done {
  border-color: #ffffff;
  color: #ffffff;
}

.analysis-status.error {
  border-color: #ff6b6b;
  color: #ffb8b8;
}

.drop-zone {
  display: grid;
  align-content: center;
  min-height: 112px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: var(--field);
  cursor: pointer;
}

.drop-zone strong {
  font-size: inherit;
  line-height: inherit;
}

.drop-zone span,
.muted,
.status-line,
.source-status,
.summary-bar,
.preview-meta,
.inspector-meta {
  color: var(--muted);
}

.source-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.source-button {
  display: grid;
  place-items: center;
  text-align: center;
}

.source-button input {
  display: none;
}

.fps-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.fps-control input {
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--field);
  color: var(--text);
  font-weight: 750;
}

.source-status,
.source-list-head,
.stage-header,
.sequence-player-meta,
.sheet-toolbar,
.data-header,
.settings-header,
.preview-editor-header,
.style-graph-header,
.data-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  overflow: auto;
}

.video-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--field);
  cursor: pointer;
}

.video-card.active {
  border-color: #ffffff;
  background: var(--field-hover);
}

.video-title {
  font-weight: 850;
  overflow-wrap: anywhere;
}

.video-meta,
.mini {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: inherit;
  line-height: inherit;
}

.progress-track {
  height: 6px;
  background: #3d3d3d;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #ffffff;
}

.inline-button.danger-inline-button {
  color: #ffb8b8;
}

.inline-button.danger-inline-button:hover {
  border-color: #ffb8b8;
  color: #ffffff;
}

.action-stack {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.video-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.video-stage {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  min-height: 0;
  overflow: hidden;
}

.source-viewer {
  flex: 0 0 auto;
  min-height: 238px;
  padding: 10px;
}

.source-viewer .stage-header {
  align-items: start;
}

.source-viewer .stage-header .secondary-button {
  min-height: 30px;
  padding: 5px 8px;
}

.source-viewer .summary-bar {
  max-height: 50px;
  overflow: hidden;
}

.source-viewer .video-shell {
  aspect-ratio: 16 / 9;
}

.signal-search {
  order: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 10px;
}

.signal-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 9px 11px;
  font-weight: 750;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  font-size: inherit;
  line-height: inherit;
  font-weight: 750;
}

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.summary-bar span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: var(--field);
}

.summary-bar span.dataset-king {
  border-color: var(--signal);
  color: #ffffff;
  background: linear-gradient(90deg, rgba(242, 211, 79, 0.2), var(--field));
}

.video-shell {
  position: relative;
  min-height: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 100%;
  align-self: center;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #202020;
}

.sequence-video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: #202020;
  object-fit: contain;
}

.sequence-player-meta {
  min-height: 18px;
  line-height: 18px;
  overflow: hidden;
}

.sequence-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.video-fullscreen-button {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.62);
  color: #ffffff;
  cursor: pointer;
}

.video-fullscreen-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-fullscreen-button:hover {
  background: rgba(0, 0, 0, 0.82);
}

.video-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  background: #000000;
}

.video-shell:fullscreen .sequence-video,
.video-shell:fullscreen .sequence-overlay {
  width: 100%;
  height: 100%;
}

.video-shell:fullscreen .video-fullscreen-button {
  right: 14px;
  top: 14px;
}

.product-main {
  position: relative;
}

.cutout-column {
  position: relative;
}

.video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.28);
  pointer-events: none;
  font-size: inherit;
  z-index: 3;
}

.sequence-video[src] + .sequence-overlay + .video-empty {
  display: none;
}

.timeline-card {
  order: 3;
  min-height: 0;
  overflow: hidden;
  padding: 8px 10px;
}

.timeline-card summary {
  display: flex;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  color: var(--muted);
  font-weight: 780;
}

.timeline-card summary::-webkit-details-marker {
  display: none;
}

.sequence-scrub,
.sequence-track {
  margin-top: 7px;
}

.sequence-scrub {
  position: relative;
  height: 22px;
  overflow: hidden;
  background: #252525;
  cursor: default;
  touch-action: none;
}

.sequence-scrub-fill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 0;
  width: 100%;
  background: rgba(255, 216, 0, 0.24);
  border: 1px solid rgba(255, 216, 0, 0.65);
  pointer-events: none;
}

.sequence-scrub-handle {
  position: absolute;
  top: 2px;
  left: 0;
  width: 12px;
  height: calc(100% - 4px);
  background: #ffd800;
  border: 1px solid #000000;
  transform: translateX(-50%);
  cursor: grab;
  z-index: 4;
}

.sequence-scrub-handle:active,
.sequence-trim-handle:active {
  cursor: grabbing;
}

.sequence-trim-handle {
  position: absolute;
  top: 1px;
  left: 0;
  width: 8px;
  height: calc(100% - 2px);
  background: #ffffff;
  border: 1px solid #000000;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 3;
}

.sequence-trim-handle.start::before,
.sequence-trim-handle.end::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--bg);
}

.sequence-trim-handle.start::before {
  right: 2px;
}

.sequence-trim-handle.end::before {
  left: 2px;
}

.sequence-track {
  display: flex;
  gap: 2px;
  min-height: 18px;
  overflow-x: auto;
}

.sequence-tick {
  flex: 0 0 7px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: #686868;
}

.sequence-tick.nearby {
  background: #b8b8b8;
}

.sequence-tick.active {
  background: var(--accent);
}

.sequence-tick.outside-trim {
  opacity: 0.25;
}

.sequence-lane,
.frame-grid {
  display: flex;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.sequence-lane {
  margin-top: 10px;
}

.capture-strip {
  order: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.strip-label {
  writing-mode: initial;
  transform: none;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-content: start;
  overflow: auto;
}

.frame-card,
.sequence-frame {
  flex: 0 0 92px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--field);
  cursor: pointer;
}

.frame-card.selected,
.sequence-frame.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px #ffffff, 0 0 18px rgba(242, 211, 79, 0.28);
}

.frame-card img,
.sequence-face-thumb img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 44%, rgba(242, 211, 79, 0.1), transparent 42%),
    #191919;
}

.frame-card {
  min-width: 0;
}

.sequence-frame-header {
  display: none;
}

.frame-info {
  display: grid;
  gap: 4px;
  padding: 6px;
  min-height: 48px;
  border-top: 1px solid var(--line);
}

.frame-action {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #ffffff;
  font-weight: 800;
}

.frame-info .mini {
  display: block;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sequence-snapshot,
.sequence-face-row {
  display: none;
}

.side-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.preview-card,
.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
}

.preview-card {
  overflow: auto;
}

.card-title {
  color: var(--muted);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.inspector-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.capture-rank {
  display: grid;
  place-items: center;
  width: 48px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--field);
  color: #ffffff;
  font-weight: 850;
}

.inspector-content {
  position: relative;
  display: grid;
  grid-template-rows: minmax(210px, 1fr) auto auto auto auto;
  gap: 10px;
  min-height: 0;
  margin-top: 12px;
}

.inspector-content.analysis-running::after {
  content: "OpenRouter analyzing image";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  border: 1px solid #f2d34f;
  background: rgba(0, 0, 0, 0.84);
  color: #ffffff;
  padding: 8px 10px;
  text-align: center;
  font-weight: 750;
}

.character-stage {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #191919;
  background-size: 28px 28px, 28px 28px;
  cursor: crosshair;
  touch-action: manipulation;
}

.character-stage.inspecting {
  cursor: progress;
}

.inspector-preview {
  display: block;
  width: min(100%, 300px);
  height: 100%;
  margin: 0 auto;
  min-height: 0;
  object-fit: contain;
  background: transparent;
  user-select: none;
  -webkit-user-drag: none;
  position: relative;
  z-index: 1;
}

.garment-mask-preview {
  position: absolute;
  inset: 0;
  display: block;
  width: min(100%, 300px);
  height: 100%;
  margin: 0 auto;
  object-fit: contain;
  background: transparent;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 2;
}

.inspector-scan-canvas {
  position: absolute;
  inset: 0;
  width: min(100%, 300px);
  height: 100%;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.character-stage.garment-active .inspector-preview {
  opacity: 1;
}

.mask-outline-canvas {
  position: absolute;
  inset: 0;
  width: min(100%, 300px);
  height: 100%;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
  z-index: 3;
}

.inspector-point-marker {
  position: absolute;
  z-index: 4;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border: 2px solid #f2d34f;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.85), 0 0 18px rgba(242, 211, 79, 0.8);
  background: rgba(242, 211, 79, 0.22);
  pointer-events: none;
  animation: clickInspectPulse 0.9s ease-in-out infinite;
}

.inspector-point-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.click-inspector-card-loading {
  border-color: rgba(242, 211, 79, 0.48);
  background: linear-gradient(180deg, rgba(242, 211, 79, 0.08), rgba(255, 255, 255, 0.015));
}

.click-inspector {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.click-inspector-results {
  display: grid;
  gap: 8px;
}

.click-inspector-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.click-inspector-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.click-inspector-title {
  color: #ffffff;
  font-weight: 800;
}

.click-inspector-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.click-inspector-meta span,
.click-inspector-evidence li,
.click-inspector-note {
  overflow-wrap: anywhere;
}

.click-inspector-evidence {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.click-inspector-matches {
  display: grid;
  gap: 6px;
}

.click-inspector-match {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  background: var(--field);
}

.click-inspector-match a {
  color: #ffffff;
  text-decoration: none;
}

.click-inspector-match a:hover {
  text-decoration: underline;
}

@keyframes clickInspectPulse {
  0% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
}

.dataset-score {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--field);
}

.dataset-score-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 850;
}

.dataset-score-head span:last-child {
  color: var(--signal);
}

.dataset-score-track {
  height: 7px;
  overflow: hidden;
  background: #1f1f1f;
}

.dataset-score-fill {
  height: 100%;
  background: var(--signal);
}

.dataset-score-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
}

.zone-panel {
  display: grid;
  gap: 8px;
}

.zone-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  max-height: 104px;
  overflow: auto;
}

.zone-chip {
  min-height: 30px;
  padding: 6px 4px;
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
}

.zone-chip.active {
  border-color: var(--signal);
  color: #ffffff;
  background: var(--signal-soft);
}

.zone-status {
  grid-column: 1 / -1;
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--field);
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-controls {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.editor-controls label {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.editor-controls input[type="range"],
.editor-controls select {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
}

.editor-check {
  grid-template-columns: auto minmax(0, 1fr) !important;
  justify-content: start;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 10px 10px;
}

.download-link {
  text-decoration: none;
}

.review-line {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.review-line select {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
}

.chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  color: var(--muted);
  padding-right: 2px;
}

.chat-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.chat-scope-toggle {
  display: flex;
  justify-self: end;
  max-width: 100%;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--field);
}

.chat-scope-toggle button {
  min-height: 30px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  font-weight: 750;
  white-space: nowrap;
}

.chat-scope-toggle button:last-child {
  border-right: 0;
}

.chat-scope-toggle button.active {
  background: #ffffff;
  color: #000000;
}

.chat-message {
  width: fit-content;
  max-width: 88%;
  border: 1px solid var(--line);
  padding: 10px 11px;
  background: var(--field);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.chat-message.user {
  align-self: flex-end;
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-message.pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 74px;
  color: var(--muted);
}

.chat-dot {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 999px !important;
  animation: chatPulse 1.1s infinite ease-in-out;
}

.chat-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chatPulse {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes processingSweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.chat-compose {
  position: relative;
  padding-top: 10px;
}

.chat-compose textarea {
  width: 100%;
  min-height: 74px;
  resize: none;
  border: 1px solid var(--line);
  padding: 11px 62px 34px 11px;
  color: var(--text);
  background: var(--field);
  line-height: 1.35;
}

.chat-compose button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #ffffff;
  font-weight: 750;
  cursor: pointer;
}

.chat-compose button:hover {
  background: transparent;
  color: var(--muted);
}

.chat-compose button:disabled {
  opacity: 0.45;
}

.data-view,
.settings-view,
.preview-editor-view,
.style-graph-view {
  position: absolute;
  inset: 14px;
  z-index: 10;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.data-header,
.settings-header,
.preview-editor-header,
.style-graph-header {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.data-header p,
.settings-header p,
.preview-editor-header p,
.style-graph-header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.style-graph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 12px;
  min-height: 0;
  padding: 12px;
}

.style-graph-canvas-wrap,
.style-graph-side {
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.style-graph-canvas-wrap {
  position: relative;
  overflow: hidden;
  cursor: grab;
  background: #282828;
}

.style-graph-canvas-wrap:active {
  cursor: grabbing;
}

.style-graph-canvas.node-dragging {
  cursor: grabbing;
}

.style-graph-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.style-graph-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.style-graph-node {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 260px;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-weight: 750;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

.style-graph-dot {
  flex: 0 0 auto;
  border: 1px solid #ffffff;
  border-radius: 999px !important;
  background: currentColor;
  box-shadow: 0 0 18px currentColor, 0 0 2px #ffffff inset;
}

.style-graph-node.brand {
  color: #ffffff;
}

.style-graph-node.style {
  color: #f2d34f;
}

.style-graph-node.garment {
  color: #d8d8d8;
}

.style-graph-node.color {
  color: #8fb8ff;
}

.style-graph-label {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  max-width: 220px;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
}

.style-graph-label small {
  color: currentColor;
  opacity: 0.82;
}

.style-graph-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.style-graph-stats {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
  max-height: 310px;
  min-height: 0;
  overflow: auto;
}

.style-graph-stats > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.style-graph-stats strong {
  font-size: 20px;
  line-height: 1;
}

.style-graph-stats span,
.style-graph-stats section p span {
  color: var(--muted);
}

.style-graph-stats section {
  display: grid;
  gap: 5px;
  padding-top: 8px;
}

.style-graph-stats section b {
  color: var(--muted);
  text-transform: uppercase;
}

.style-graph-stats section p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  border-bottom: 1px solid #1f1f1f;
  padding-bottom: 5px;
  overflow-wrap: anywhere;
}

.style-graph-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 0 0 auto;
  gap: 7px;
  color: var(--muted);
}

.style-graph-legend span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.node-swatch {
  width: 9px;
  height: 9px;
  border: 1px solid #ffffff;
  border-radius: 999px !important;
}

.node-swatch.person {
  background: var(--field);
}

.node-swatch.brand {
  background: #ffffff;
}

.node-swatch.style {
  background: #f2d34f;
}

.node-swatch.garment {
  background: #9f9f9f;
}

.node-swatch.color {
  background: #6f6f6f;
}

.graph-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  flex: 1 1 300px;
  min-height: 300px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  overflow: hidden;
}

.graph-chat-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  padding-right: 2px;
}

.graph-chat-compose textarea {
  min-height: 92px;
  height: 92px;
}

.sheet-mode-toggle {
  display: flex;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--field);
}

.sheet-mode-toggle button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
}

.sheet-mode-toggle button:last-child {
  border-right: 0;
}

.sheet-mode-toggle button.active {
  background: #ffffff;
  color: #000000;
}

.preview-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  min-height: 0;
  padding: 12px;
}

.preview-editor-image-wrap,
.preview-editor-controls {
  min-height: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.preview-editor-image-wrap {
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
}

.editor-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
}

.preview-editor-controls {
  display: flex;
  flex-direction: column;
  padding: 12px;
  overflow: auto;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  padding: 12px;
  overflow: auto;
}

.settings-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px;
  overflow: hidden;
}

.settings-card-wide {
  grid-column: span 3;
  min-height: 160px;
}

.settings-kv {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  overflow: auto;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.4fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.settings-row span:first-child {
  color: var(--muted);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.settings-row span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.settings-log {
  flex: 1;
  min-height: 84px;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  font: inherit;
}

.preprocess-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  min-height: 0;
  overflow: auto;
}

.preprocess-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preprocess-presets button.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.preprocess-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.preprocess-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
}

.preprocess-controls input {
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
  padding: 6px 8px;
}

.preprocess-toggles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
}

.preprocess-toggles label {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.pipeline-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  overflow: auto;
}

.pipeline-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(120px, 0.35fr);
  gap: 10px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--field);
}

.pipeline-index {
  color: var(--muted);
  font-weight: 750;
}

.pipeline-title {
  font-weight: 750;
}

.pipeline-desc,
.pipeline-meta {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.data-table-wrap {
  min-height: 0;
  overflow: auto;
}

.data-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  max-width: 260px;
  border: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--field);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #2a2a2a;
}

.data-table th.cutout-column,
.data-table td.cutout-column {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  text-align: center;
}

.sheet-thumb {
  display: block;
  width: 86px;
  height: 122px;
  object-fit: contain;
  background: #ffffff;
}

.sheet-row {
  cursor: pointer;
}

.sheet-row:hover,
.sheet-row.selected {
  background: var(--bg);
}

.sheet-link-list a {
  color: #ffffff;
  text-decoration: none;
}

.sheet-link-list a:hover {
  text-decoration: underline;
}

.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.source-panel {
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111111;
  box-shadow: none;
}

.brand-title {
  position: absolute;
  top: 28px;
  left: 26px;
  z-index: 5;
  color: #ffffff;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 19px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.source-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 10px 11px 16px;
  border: 0;
  background: #f2f2f2;
  color: #080808;
}

.source-card .drop-zone,
.source-card .fps-control,
.source-card #uploadButton,
.source-card .source-status,
.source-card #changeSourceButton,
.source-card #refreshButton,
.source-card #analysisStatus {
  display: none;
}

.source-card .source-viewer {
  order: 1;
}

.source-card .source-list-head {
  order: 2;
}

.source-card .video-list {
  order: 3;
}

.source-card .source-toolbar {
  order: 4;
}

.source-card .status-line {
  order: 5;
}

.source-card .action-stack {
  order: 6;
}

.source-card .source-viewer,
.source-card .video-stage {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #080808;
}

.source-card .stage-header {
  margin-bottom: 6px;
}

.source-card h1 {
  color: #080808;
  font-size: 11px;
  font-weight: 650;
}

.source-card #activeVideoLabel {
  color: #8a8a8a;
  font-weight: 500;
}

.source-card .summary-bar {
  display: none;
}

.source-card .video-shell {
  border: 1px solid #cfcfcf;
  background: #111111;
}

.source-card .sequence-player-meta {
  display: flex;
  justify-content: space-between;
  color: #12305f;
  font-size: 10px;
}

.source-card .source-list-head {
  margin-top: 4px;
  color: #080808;
  font-size: 11px;
  font-weight: 800;
}

.source-card .video-list {
  gap: 0;
  min-height: 112px;
  overflow: visible;
}

.source-card .video-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 7px;
  border: 0;
  background: transparent;
  color: #080808;
}

.source-card .video-card:hover,
.source-card .video-card:focus-within {
  background: #dddddd;
}

.source-card .video-card.active {
  background: #b9b9b9;
}

.source-card .video-title {
  font-size: 10px;
  font-weight: 500;
}

.source-card .video-meta {
  grid-column: 2;
  grid-row: 1;
  justify-content: end;
  color: #050f36;
  font-size: 10px;
}

.source-card .video-meta span:first-child,
.source-card .video-meta span:nth-child(3),
.source-card .progress-track {
  display: none;
}

.source-card .source-delete-button {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #303030;
  opacity: 0;
  pointer-events: none;
}

.source-card .source-delete-button svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-card .video-card:hover .source-delete-button,
.source-card .video-card:focus-within .source-delete-button {
  opacity: 1;
  pointer-events: auto;
}

.source-card .video-card:hover .video-meta,
.source-card .video-card:focus-within .video-meta {
  opacity: 0;
}

.source-card .source-delete-button:hover {
  background: #cfcfcf;
  color: #000000;
}

.source-card .source-toolbar {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.source-card button,
.source-card .source-button {
  min-height: 24px;
  padding: 5px 9px;
  border: 0;
  background: #3f3f3f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 750;
}

.source-card .source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  background: #3f3f3f;
  color: #ffffff;
}

.source-card .button-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.source-card .source-toolbar .button-icon {
  width: 16px;
  height: 16px;
  background: transparent;
}

.source-card .button-icon svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-card .primary-button {
  min-height: 25px;
  background: #c9dcff;
  color: #0a2a66;
}

.source-card .secondary-button,
.source-card .graph-button {
  background: #e7e7e7;
  color: #000000;
}

.source-card .danger-button {
  background: #f5c6c8;
  color: #8a1018;
}

.source-card .action-stack {
  gap: 10px;
  margin-top: 0;
  padding: 4px 2px 0;
  border-top: 0;
}

.source-card .action-stack button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  padding: 5px 12px;
  background: #e7e7e7;
  color: #000000;
  border-radius: 6px !important;
}

.source-card .action-stack .primary-button {
  background: #c9dcff;
  color: #0a2a66;
}

.source-card .action-stack .danger-button {
  background: #f5c6c8;
  color: #8a1018;
}

.source-card .status-line {
  min-height: 12px;
  margin: 0;
  color: #5d5d5d;
  font-size: 10px;
}

.app-shell {
  grid-template-columns: 235px minmax(0, 1fr) 232px;
  gap: 14px;
  padding: 58px 26px 14px;
  background: #2f2f2f;
}

.source-panel {
  padding: 0;
  gap: 7px;
}

.brand-title {
  display: block;
  position: absolute;
  top: 28px;
  left: 26px;
  z-index: 5;
}

.source-card {
  padding: 9px 11px 16px;
  background: #f8f8f8;
}

.source-card .video-list {
  min-height: 118px;
}

.source-card .action-stack {
  gap: 13px;
  padding-top: 6px;
}

.source-card .primary-button,
.source-card .secondary-button,
.source-card .danger-button,
.source-card .source-button {
  min-height: 25px;
}

.video-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 10px 32px 16px;
  border: 0;
  background: #fbfbfb;
  color: #080808;
  overflow: hidden;
}

.signal-search {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 7px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
}

.signal-search input {
  height: 24px;
  min-height: 24px;
  border: 1px solid #333333;
  background: #ffffff;
  color: #333333;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 400;
}

.signal-search input::placeholder {
  color: #4d4d4d;
  opacity: 1;
}

.quick-refresh-button {
  width: 104px;
  height: 24px;
  min-height: 24px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: #4d85e5;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.quick-refresh-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.top-search-answer {
  grid-column: 1 / -1;
  max-height: 72px;
  overflow: auto;
  padding: 6px 8px;
  border-left: 3px solid #4d85e5;
  background: #eeeeee;
  color: #111111;
  font-size: 11px;
  line-height: 1.35;
}

.top-search-answer.error {
  border-left-color: #d45b5b;
  background: #f6dddd;
}

.timeline-card {
  display: none;
}

.capture-strip {
  order: 2;
  display: block;
  min-height: 0;
  padding: 8px 20px 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.strip-label {
  display: none;
}

.frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 48px);
  gap: 10px 11px;
  align-content: start;
  justify-content: start;
  height: 100%;
  padding: 13px 14px 0;
  overflow: auto;
}

.frame-card,
.sequence-frame {
  position: relative;
  width: 48px;
  height: 48px;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.frame-card img,
.sequence-face-thumb img {
  display: block;
  width: 48px;
  height: 48px;
  background: #efefef;
  object-fit: cover;
  object-position: center;
}

.frame-card.selected {
  outline: 0;
  box-shadow: inset 0 0 0 2px #4d85e5;
}

.frame-index-badge {
  position: absolute;
  top: 2px;
  left: 3px;
  z-index: 2;
  color: #ffd800;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  pointer-events: none;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.frame-info {
  display: none;
}

.side-panel {
  display: block;
  min-width: 0;
  border: 0;
  background: #fbfbfb;
  overflow: hidden;
}

.preview-card {
  position: relative;
  height: 100%;
  padding: 9px 8px 14px;
  border: 0;
  border-radius: 6px;
  background: #fbfbfb;
  color: #080808;
  overflow: hidden;
}

.preview-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: clamp(330px, 48vh, 405px);
  background-image: radial-gradient(circle, rgba(80, 80, 80, 0.13) 1.45px, transparent 1.65px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 0;
}

.inspector-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
  margin-bottom: 8px;
}

.preview-card:has(.inspector-content.hidden) .inspector-head {
  display: grid;
  place-items: center;
  height: 100%;
  color: #555555;
  text-align: center;
}

.preview-card:has(.inspector-content.hidden) .capture-rank {
  display: none;
}

.preview-card .card-title {
  color: #080808;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
}

.preview-card #inspectorEmpty {
  display: none;
}

.capture-rank {
  display: block;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
  color: #d6d6d6;
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.inspector-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  height: calc(100% - 30px);
  margin-top: 0;
}

.character-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  flex: 0 0 clamp(245px, 36vh, 300px);
  min-height: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.inspector-preview,
.garment-mask-preview,
.inspector-scan-canvas,
.mask-outline-canvas {
  width: min(100%, 142px);
  height: 100%;
  max-height: 100%;
  background: transparent;
  object-fit: contain;
  object-position: center;
}

.inspector-preview {
  align-self: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
}

.garment-mask-preview,
.inspector-scan-canvas,
.mask-outline-canvas {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.dataset-score,
.preview-actions,
.selectedAnalysisStatus,
#selectedAnalysisStatus,
.click-inspector {
  display: none;
}

.inspector-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  padding: 8px 12px 8px;
  background: #fbfbfb;
}

.similar-block {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.similar-title {
  color: #000000;
  font-size: 9px;
  font-weight: 650;
}

.similar-thumbs {
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
}

.similar-thumb {
  width: 22px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.similar-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.inspector-decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.inspector-decision-actions button {
  min-height: 24px;
  border: 0;
  padding: 0 12px;
  color: #000000;
  font-size: 10px;
  font-weight: 800;
}

.keep-capture-button {
  background: #dfeee0;
  color: #173d1a;
}

.purge-capture-button {
  background: #f5c6c8;
  color: #8a1018;
}

.inspector-product-list {
  display: grid;
  gap: 10px;
}

.inspector-product-card {
  overflow: hidden;
  background: #4d85e5;
  color: #ffffff;
  box-shadow: none;
}

.product-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 8px;
}

.product-thumb {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #ffffff;
}

.product-thumb-empty {
  background: rgba(255, 255, 255, 0.28);
}

.product-copy {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.product-title {
  color: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.product-copy a,
.product-copy span {
  color: #ffffff;
  font-size: 10px;
  font-style: italic;
  line-height: 1.15;
  overflow: hidden;
  text-decoration: underline;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-commit-button {
  width: 100%;
  min-height: 21px;
  border: 0;
  background: #00345f;
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
}

.commit-all-link {
  justify-self: center;
  min-height: 16px;
  border: 0;
  background: transparent;
  color: #000000;
  padding: 0;
  font-size: 10px;
  font-weight: 650;
  text-decoration: underline;
}

.dataset-score {
  display: none;
}

.dataset-score-head,
.capture-rank {
  color: #111111;
}

.dataset-score-track {
  background: #e1e1e1;
}

.dataset-score-fill {
  background: #4d85e5;
}

.dataset-score-meta,
.inspector-meta,
.click-inspector-meta,
.click-inspector-evidence,
.click-inspector-note {
  color: #555555;
}

.inspector-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 0;
  width: 100%;
  color: #555555;
}

.inspector-meta span,
.dataset-score-meta span {
  padding: 3px 6px;
  border-radius: 3px;
  background: #efefef;
  color: #333333;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.1;
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 0;
}

.preview-card button,
.preview-card .primary-button,
.preview-card .secondary-button {
  min-height: 26px;
  border: 0;
  background: #eeeeee;
  color: #000000;
}

.preview-card .primary-button {
  background: #4d85e5;
  color: #ffffff;
}

.preview-card .analysis-status {
  min-height: 26px;
  border: 0;
  background: #eeeeee;
  color: #333333;
  padding: 6px 8px;
  font-size: 11px;
}

.preview-card .card-title {
  color: #333333;
}

.click-inspector {
  gap: 6px;
  margin-top: 0;
}

.click-inspector-card,
.click-inspector-match {
  border: 0;
  background: #eeeeee;
  color: #222222;
}

.click-inspector-title,
.click-inspector-match a {
  color: #111111;
}

.preview-card #inspectorTitle {
  color: #080808;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: none;
}

.preview-card .capture-rank {
  color: #000000;
  font-size: 9px;
  font-weight: 850;
}

.preview-card .dataset-score,
.preview-card .preview-actions,
.preview-card #selectedAnalysisStatus,
.preview-card .click-inspector {
  display: none;
}

.preview-card .keep-capture-button {
  background: #dfeee0;
  color: #173d1a;
}

.preview-card .purge-capture-button {
  background: #f5c6c8;
  color: #8a1018;
}

.preview-card .product-commit-button {
  background: #00345f;
  color: #ffffff;
}

.preview-card .commit-all-link {
  background: transparent;
  color: #000000;
}

@media (max-width: 1000px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 8px;
    overflow: hidden;
  }

  .source-panel,
  .side-panel {
    display: none;
  }

  .video-panel {
    grid-template-rows: minmax(0, 1fr) auto minmax(116px, 140px);
    gap: 8px;
  }

  .video-stage {
    padding: 10px;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-card-wide {
    grid-column: span 1;
  }

  .preview-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .style-graph-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .style-graph-side {
    display: none;
  }
}
