.gamma-workspace {
  --gamma-panel-border: #cbd5e1;
  --gamma-panel-bg: #f8fafc;
  --gamma-display-bg: #111827;
  --gamma-display-fg: #dcfce7;
}

.gamma-bench {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(17rem, 0.8fr);
  gap: 1.25rem;
  align-items: stretch;
  margin: 1.25rem 0;
}

.gamma-apparatus-panel,
.gamma-controls-panel,
.gamma-stage {
  border: 1px solid var(--gamma-panel-border);
  border-radius: 0.75rem;
  background: var(--gamma-panel-bg);
  padding: 1rem;
}

.gamma-apparatus {
  display: block;
  width: 100%;
  min-height: 17rem;
}

.gamma-track { stroke: #64748b; stroke-width: 8; stroke-linecap: round; }
.gamma-track-tick { stroke: #94a3b8; stroke-width: 2; }
.gamma-source-body { fill: #e2e8f0; stroke: #475569; stroke-width: 2; }
.gamma-source-core { fill: #facc15; stroke: #854d0e; stroke-width: 2; }
.gamma-source-symbol { fill: #111827; font-size: 1.1rem; font-weight: 800; }
.gamma-detector-body { fill: #dbeafe; stroke: #1e3a8a; stroke-width: 2; }
.gamma-detector-window { fill: #bfdbfe; stroke: #1e40af; stroke-width: 2; }
.gamma-pulse { stroke: #7c3aed; stroke-width: 3; stroke-dasharray: 8 8; }
.gamma-ruler-text { fill: #475569; font-size: 0.78rem; }
.gamma-label { fill: #0f172a; font-size: 0.9rem; font-weight: 700; }
.gamma-counter { fill: var(--gamma-display-bg); stroke: #475569; stroke-width: 2; }
.gamma-counter-text { fill: var(--gamma-display-fg); font: 700 1rem ui-monospace, SFMono-Regular, Menlo, monospace; }

.gamma-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gamma-controls-panel select,
.gamma-analysis-form input,
.gamma-stage input[type="text"] {
  max-width: 18rem;
}

.gamma-instrument-readouts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.5rem 0;
}

.gamma-instrument-readouts div {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid #dbe2ea;
  border-radius: 0.55rem;
  background: #fff;
}

.gamma-instrument-readouts dt {
  font-size: 0.78rem;
  color: #475569;
}

.gamma-instrument-readouts dd {
  margin: 0.25rem 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.gamma-stage { margin: 1rem 0; }
.gamma-safety { border-left: 0.35rem solid #b45309; padding-left: 0.9rem; }
.gamma-graph-frame { overflow-x: auto; margin: 1rem 0; }
.gamma-graph-frame svg {
  display: block;
  width: 100%;
  min-width: 34rem;
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 0.5rem;
}

.gamma-analysis-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}
.gamma-analysis-form label { flex-basis: 100%; }
.gamma-workspace-actions { margin-top: 1.25rem; }

@media (max-width: 800px) {
  .gamma-bench { grid-template-columns: 1fr; }
  .gamma-apparatus { min-height: 13rem; }
  .gamma-instrument-readouts { grid-template-columns: 1fr; }
}

.gamma-ruler { stroke: #475569; stroke-width: 2; }
.gamma-detector-hit-area { fill: transparent; }
[data-gamma-detector][role="slider"] { cursor: grab; touch-action: none; }
[data-gamma-detector][role="slider"]:active { cursor: grabbing; }
[data-gamma-detector][role="slider"]:focus { outline: none; }
[data-gamma-detector][role="slider"]:focus .gamma-detector-hit-area { stroke: #1d4ed8; stroke-width: 3; }
[data-counting="true"] [data-gamma-detector] { cursor: wait; }
[data-gamma-count-progress] { width: 100%; accent-color: #1d4ed8; }
.gamma-ruler-text { font-size: 13px; }
.gamma-reference { stroke: #1d4ed8; stroke-width: 2; stroke-dasharray: 3 3; }
