.tgu-editor-workspace {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #121516;
}

.tgu-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  min-height: 3.55rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
  background: var(--bg-panel);
}

.tgu-editor-toolbar__identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 12rem;
}

.tgu-editor-toolbar__title {
  overflow: hidden;
  max-width: 14rem;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgu-editor-toolbar__meta,
.tgu-editor-rail__meta,
.tgu-editor-panel__hint,
.tgu-editor-panel__id {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.tgu-editor-panel__list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
}

.tgu-editor-toolbar__group {
  display: flex;
  gap: 0.35rem;
}

.tgu-editor-toolbar__spacer {
  flex: 1;
  min-width: 1rem;
}

.tgu-editor-target-zrv {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.tgu-editor-target-zrv__label {
  color: var(--text-dim);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tgu-select {
  height: 1.95rem;
  max-width: 14rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 0.5rem;
  background: #101214;
  color: var(--text);
  font-size: 0.78rem;
}

.tgu-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tgu-editor-type-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 3px;
  background: var(--t-optical);
  box-shadow: 0 0 12px rgba(104, 195, 189, 0.4);
}

.tgu-editor-window-control {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0.12rem;
  background: #101214;
}

.tgu-editor-window-control button {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
}

.tgu-editor-window-control span {
  min-width: 4.2rem;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.64rem;
  text-align: center;
}

.tgu-editor-button--warning {
  color: #ffe7b5;
}

.tgu-editor-notices:empty {
  display: none;
}

.tgu-editor-workspace > .tgu-empty {
  flex: 1;
}

.tgu-editor-notice {
  margin: 0.55rem 0.8rem 0;
}

.tgu-editor-layout {
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.tgu-editor-rail {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--bg-panel);
}

.tgu-editor-rail__section {
  display: grid;
  gap: 0.65rem;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line-soft);
}

.tgu-editor-eyebrow {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tgu-editor-rail__title {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.tgu-editor-rail__plan-dates {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.6rem;
  margin: 0;
}

.tgu-editor-rail__plan-dates dt {
  color: var(--text-dim);
  font-size: 0.66rem;
}

.tgu-editor-rail__plan-dates dd {
  margin: 0;
  color: var(--text);
  font-size: 0.7rem;
  text-align: right;
}

.tgu-editor-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.tgu-editor-stat {
  display: grid;
  gap: 0.1rem;
}

.tgu-editor-stat span {
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
}

.tgu-editor-stat small {
  color: var(--text-dim);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.tgu-editor-context-list {
  display: grid;
  gap: 0.28rem;
  max-height: 21rem;
  overflow: auto;
}

.tgu-editor-context-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 0.42rem 0.45rem;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
}

.tgu-editor-context-item.is-enabled {
  background: var(--bg-panel-2);
  color: var(--text);
}

.tgu-editor-context-item__check {
  display: grid;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.68rem;
}

.tgu-editor-context-item span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgu-editor-context-item small {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.tgu-editor-center {
  display: grid;
  /* grid-template-rows is set via inline style to support drag-resize */
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.tgu-editor-map-stage {
  position: relative;
  min-height: 6rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0b0d0e;
}

.map-pass-selector {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 20;
  width: 28rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 26, 28, 0.93);
  backdrop-filter: blur(6px);
  font-size: 0.78rem;
  user-select: none;
}

.map-pass-selector--empty {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem;
  width: auto;
  max-width: 28rem;
}

.map-pass-selector__empty-note {
  color: var(--text-muted, #98a2ac);
  font-size: 0.74rem;
}

.map-pass-selector__header {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
}

.map-pass-selector__title {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.map-pass-selector__nums {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.map-pass-selector__times {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.66rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-pass-selector__reset {
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.06rem 0.4rem;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.map-pass-selector__reset:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.map-pass-selector__body {
  padding: 0.1rem 1rem 0.55rem;
  cursor: pointer;
}

/* Track line */
.map-pass-selector__track {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0.85rem 0 0;
}

.map-pass-selector__fill {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
}

/* Orbit tick marks */
.map-pass-selector__tick {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 10px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--line-soft);
  pointer-events: none;
  transition: background 0.1s;
}

.map-pass-selector__tick.is-active {
  background: rgba(104, 195, 189, 0.4);
}

/* Draggable handles */
.map-pass-selector__thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-panel);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: grab;
  z-index: 2;
  transition: transform 0.08s;
}

.map-pass-selector__thumb:active {
  cursor: grabbing;
  transform: scale(1.18);
}

/* Handle labels */
.map-pass-selector__labels {
  position: relative;
  height: 2.2rem;
  margin-top: 0.25rem;
  pointer-events: none;
}

.map-pass-selector__label {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}

.map-pass-selector__label--right {
  transform: translateX(-50%);
}

.map-pass-selector__label-num {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--accent);
  line-height: 1;
}

.map-pass-selector__label-time {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  white-space: nowrap;
  line-height: 1;
}

/* Контейнер контролов поверх карты слотов: фильтр «Сутки» + степпер витков столбиком.
   Нейтрализуем абсолютное позиционирование вложенных .map-pass-selector — стопку держит контейнер. */
.tgu-slots-map-controls {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tgu-slots-map-controls .map-pass-selector {
  position: static;
}

/* Подпись прохождения (КА · оборот · ветвь · дата-время) во всю ширину, без обрезки —
   дата/время чувствительны для оператора, должны быть видны целиком. */
.tgu-pass-stepper__label {
  padding: 0 0.65rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Степпер витков: ряд навигации ◀ ▶ под шапкой-подписью. */
.tgu-pass-stepper__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 0.1rem 0.65rem 0.5rem;
}

.tgu-pass-stepper__btn {
  flex-shrink: 0;
  width: 2rem;
  height: 1.7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}

.tgu-pass-stepper__btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.tgu-pass-stepper__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.tgu-editor-map-stage .tgu-2d-map {
  min-height: 6rem;
}

.tgu-editor-map-resizer {
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 8px;
  cursor: row-resize;
  z-index: 10;
}

.tgu-editor-map-resizer::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 3rem;
  height: 2px;
  border-radius: 1px;
  background: var(--line-soft);
  transform: translateX(-50%);
  transition: background 0.15s;
}

.tgu-editor-map-resizer:hover::after {
  background: var(--accent);
}

.tgu-2d-map.is-picking {
  cursor: crosshair;
}

.tgu-2d-map__target circle {
  fill: rgba(240, 173, 46, 0.18);
  stroke: var(--now);
  stroke-width: 2;
}

.tgu-2d-map__target line {
  stroke: var(--now);
  stroke-width: 1.4;
}

.tgu-2d-map__target text {
  fill: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  paint-order: stroke;
  stroke: rgba(8, 16, 15, 0.85);
  stroke-width: 3px;
}

.tgu-2d-map__target--confirmed circle {
  fill: var(--t-optical-dim);
  stroke: var(--t-optical);
}

.tgu-2d-map__target--confirmed line {
  stroke: var(--t-optical);
}

.tgu-2d-map__target--confirmed.is-selected circle {
  fill: rgba(104, 195, 189, 0.35);
  stroke: var(--t-optical);
  stroke-width: 2.5;
  r: 8;
}

.tgu-2d-map__target--confirmed.is-selected line {
  stroke-width: 2;
}

.tgu-editor-timeline {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--bg-base);
}

.tgu-editor-timeline__surface {
  position: relative;
  min-width: 46rem;
}

.tgu-editor-timeline__axis-label,
.tgu-editor-timeline__axis,
.tgu-editor-timeline__lane-label {
  position: absolute;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}

.tgu-editor-timeline__axis-label {
  left: 0;
  top: 0;
  height: 40px;
  border-right: 1px solid var(--line);
  padding: 1.05rem 0.65rem 0;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.tgu-editor-timeline__axis {
  top: 0;
  height: 40px;
}

.tgu-editor-timeline__day,
.tgu-editor-timeline__tick-label {
  position: absolute;
  border-left: 1px solid var(--line);
  padding-left: 0.28rem;
}

.tgu-editor-timeline__day {
  top: 0.18rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  height: 1rem;
}

.tgu-editor-timeline__day strong {
  color: var(--text);
  font-size: 0.68rem;
}

.tgu-editor-timeline__day span,
.tgu-editor-timeline__tick-label {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.tgu-editor-timeline__tick-label {
  top: 1.2rem;
  height: 1.15rem;
}

.tgu-editor-timeline__grid {
  position: absolute;
  bottom: 0;
  pointer-events: none;
}

.tgu-editor-timeline__grid > div {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--grid);
}

.tgu-editor-timeline__bound {
  position: absolute;
  bottom: 0;
  z-index: 8;
  border-left: 1.5px solid var(--accent);
  pointer-events: none;
}

.tgu-editor-timeline__bound span {
  position: absolute;
  top: 0;
  border-radius: 3px;
  padding: 0 0.24rem;
  background: var(--accent);
  color: var(--bg-base);
  font-family: var(--mono);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.tgu-editor-timeline__bound--start span {
  left: 0.18rem;
}

.tgu-editor-timeline__bound--end span {
  right: 0.18rem;
}

.tgu-editor-timeline__lane {
  position: absolute;
  left: 0;
  right: 0;
}

.tgu-editor-timeline__lane-label {
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  border-right: 1px solid var(--line);
  padding: 0 0.65rem;
}

.tgu-editor-timeline__lane-label span {
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgu-editor-timeline__lane-label small {
  color: var(--accent);
  font-size: 0.62rem;
}

.tgu-editor-timeline__lane-body {
  position: absolute;
  top: 0;
  bottom: 0;
  border-bottom: 1px solid var(--line-soft);
}

.tgu-editor-work {
  position: absolute;
  top: 0.75rem;
  display: flex;
  align-items: start;
  gap: 0.28rem;
  height: calc(100% - 1.5rem);
  overflow: hidden;
  appearance: none;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  padding: 0.25rem 0.45rem;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  user-select: none;
}

.tgu-editor-work.is-selected {
  outline: 1.5px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(104, 195, 189, 0.18);
}

.tgu-editor-work.has-conflict {
  border-color: var(--now);
}

.tgu-editor-work--context {
  top: 0.45rem;
  height: calc(100% - 0.9rem);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  opacity: 0.62;
  pointer-events: none;
}

/* Активная дорожка разбита на два ряда: верхний — съёмка, нижний — сброс.
   Бар центрируется по своему ряду и растёт вместе с ним, но не выше потолка —
   чтобы узкие включения не растягивались в непропорционально высокие полоски. */
.tgu-editor-work--shoot,
.tgu-editor-work--downlink {
  height: min(56px, calc(50% - 0.55rem));
  transform: translateY(-50%);
}

.tgu-editor-work--shoot {
  top: 25%;
}

.tgu-editor-work--downlink {
  top: 75%;
}

.tgu-editor-timeline__row-hint {
  position: absolute;
  right: 0.65rem;
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tgu-editor-timeline__row-hint--shoot {
  top: 25%;
  transform: translateY(-50%);
  color: var(--t-optical);
}

.tgu-editor-timeline__row-hint--downlink {
  top: 75%;
  transform: translateY(-50%);
  color: var(--accent);
}

.tgu-editor-work__dot {
  flex: none;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: 0.2rem;
  border-radius: 2px;
}

.tgu-editor-work__label {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgu-editor-work small {
  position: absolute;
  left: 0.5rem;
  bottom: 0.2rem;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.tgu-editor-work__new {
  flex: none;
  border: 1px solid var(--now);
  border-radius: 3px;
  padding: 0 0.12rem;
  color: var(--now);
  font-family: var(--mono);
  font-size: 0.48rem;
}

.tgu-editor-visibility-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tgu-editor-visibility-label i {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
}

.tgu-editor-visibility-window {
  position: absolute;
  top: 0.32rem;
  height: calc(100% - 0.64rem);
  border: 1px solid var(--accent);
  border-radius: 4px;
}

.tgu-editor-context-divider {
  position: absolute;
  left: 0;
  height: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.34rem 0.65rem 0;
  background: var(--bg-base);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.tgu-editor-side-panel {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--bg-panel);
  padding: 0.9rem;
}

.tgu-editor-panel {
  position: relative;
  display: grid;
  gap: 0.9rem;
}

.tgu-editor-panel__head,
.tgu-editor-panel__section-head,
.tgu-editor-panel__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tgu-editor-panel__actions > .tgu-button {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
}

.tgu-editor-panel__head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.tgu-editor-panel__section {
  display: grid;
  gap: 0.55rem;
}

.tgu-editor-panel__placeholder,
.tgu-editor-target {
  border: 1px dashed var(--line);
  border-radius: 7px;
  padding: 0.65rem;
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.tgu-editor-target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  border-style: solid;
}

.tgu-editor-target i {
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--now);
  border-radius: 50%;
}

.tgu-editor-target span {
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tgu-editor-target small {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.tgu-editor-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tgu-editor-chip-row button,
.tgu-editor-pass-list button,
.tgu-editor-station button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-panel-2);
  color: var(--text-muted);
}

.tgu-editor-chip-row button {
  padding: 0.38rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.tgu-editor-chip-row button.is-selected,
.tgu-editor-pass-list button.is-selected,
.tgu-editor-station button.is-selected {
  border-color: rgba(104, 195, 189, 0.58);
  background: rgba(104, 195, 189, 0.14);
  color: var(--text);
}

.tgu-editor-pass-list,
.tgu-editor-station-list {
  display: grid;
  gap: 0.35rem;
  max-height: 14rem;
  overflow: auto;
}

.tgu-editor-pass-list button,
.tgu-editor-station button {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  text-align: left;
}

/* Узкая правая панель: строка прохода не помещается в один ряд — раскладываем
   подпись и параметры видимости в столбец, чтобы текст не обрезался. */
.tgu-editor-pass-list button {
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}

.tgu-editor-pass-list small {
  white-space: normal;
}

.tgu-editor-pass-list span,
.tgu-editor-station span {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.tgu-editor-pass-list small,
.tgu-editor-station small {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.tgu-editor-station {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.tgu-editor-station__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg-panel-2);
}

.tgu-editor-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  background: #101214;
  color: var(--text);
}

.tgu-editor-time-stepper {
  display: grid;
  gap: 0.25rem;
}

.tgu-editor-time-stepper > span {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.tgu-editor-time-stepper div {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tgu-editor-time-stepper button {
  flex: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.32rem 0.38rem;
  background: var(--bg-panel-2);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.tgu-editor-time-stepper output,
.tgu-editor-time-stepper input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.34rem 0.4rem;
  background: #101214;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-align: center;
}

.tgu-editor-time-stepper input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.5;
  cursor: pointer;
}

/* Секундный степпер окна маршрута: поле ввода на своей строке, кнопки ±  — ниже,
   чтобы помещаться в узкую правую панель. */
.tgu-editor-time-stepper--seconds {
  gap: 0.3rem;
}

.tgu-editor-time-stepper--seconds > input {
  width: 100%;
}

.tgu-editor-time-stepper__steps {
  display: flex;
  gap: 0.25rem;
}

.tgu-editor-time-stepper__steps button {
  flex: 1;
}

.tgu-editor-panel__color {
  position: absolute;
  top: 0.2rem;
  left: -0.9rem;
  width: 0.18rem;
  height: 1.4rem;
  border-radius: 999px;
}

@media (max-width: 1180px) {
  .tgu-editor-layout {
    grid-template-columns: 1fr !important;
  }

  .tgu-editor-rail,
  .tgu-editor-center,
  .tgu-editor-side-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tgu-editor-rail {
    max-height: 16rem;
  }

  .tgu-editor-side-panel {
    max-height: 24rem;
  }
}

/* Список объектов под точкой клика на карте (раскрывающиеся карточки). */
.tgu-editor-pick {
  display: grid;
  gap: 0.35rem;
}

.tgu-editor-pick__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.5rem;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: var(--bg-panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.tgu-editor-pick__row:hover {
  border-color: rgba(104, 195, 189, 0.45);
}

.tgu-editor-pick__item.is-open .tgu-editor-pick__row {
  border-color: rgba(104, 195, 189, 0.58);
  background: rgba(104, 195, 189, 0.14);
}

.tgu-editor-pick__swatch {
  grid-row: 1 / span 2;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--text-dim);
}

.tgu-editor-pick__swatch--requests { background: #ffa040; }
.tgu-editor-pick__swatch--planWorks { background: #4fd2b0; }
.tgu-editor-pick__swatch--drop { background: #ffcf3f; }
.tgu-editor-pick__swatch--station { background: #d5e2e2; }
.tgu-editor-pick__swatch--swath { background: #6fb7ff; }
.tgu-editor-pick__swatch--complexPlan { background: #c080ff; }
.tgu-editor-pick__swatch--heatmap { background: #f5803e; }
.tgu-editor-pick__swatch--tracks { background: #8d99a6; }
.tgu-editor-pick__swatch--spacecraftMarkers { background: #d5e2e2; }

.tgu-editor-pick__title {
  font-size: 0.74rem;
  font-weight: 600;
}

.tgu-editor-pick__sub {
  grid-column: 2;
  color: var(--text-dim);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tgu-editor-pick__chevron {
  grid-row: 1 / span 2;
  color: var(--text-dim);
  font-size: 0.7rem;
}

/* Вложенная карточка детали внутри раскрытого элемента — без двойной рамки/отступов. */
.tgu-editor-pick__detail {
  padding: 0.35rem 0 0.1rem;
}

.tgu-editor-pick__detail .tgu-editor-panel {
  border: 0;
  padding: 0;
}

/* Диалог выбора режима очистки плана (всё / оставить ручные съёмки). */
.tgu-editor-clear-dialog {
  width: min(26rem, calc(100vw - 2rem));
}

.tgu-editor-clear-dialog__text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #9fb0b3);
}

.tgu-editor-clear-dialog__choices {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tgu-editor-clear-dialog__choices > .tgu-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.tgu-editor-clear-dialog__choices > .tgu-button > small {
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.85;
}
