.editor-workspace {
  max-width: 1660px;
  margin: 0 auto;
  padding: 16px clamp(12px, 2vw, 32px) 26px;
  color: #213a31;
  min-width: 0;
  --ed-border: #d4dfd5;
  --ed-mono: Consolas, "Courier New", monospace;
}
.ed-top,
.ed-inline,
.ed-source,
.ed-controls,
.ed-media-head,
.ed-thead,
.ed-foot,
.ed-range-form,
.ed-ml,
.ed-result-row,
.ed-top h1,
.ed-back {
  display: flex;
  align-items: center;
}
.ed-top {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ed-back {
  padding: 0;
  color: #637a6d;
  font-size: 11px;
  border: 0;
  background: none;
}
.ed-top h1 {
  font-size: clamp(21px, 1.9vw, 30px);
  margin: 3px 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.ed-source {
  font-size: 11px;
  gap: 6px;
  color: #486558;
}
.ed-source small {
  font-family: var(--ed-mono);
  font-size: 10px;
}
.ed-inline {
  gap: 6px;
}
.ed-main-actions > small {
  font-size: 11px;
  color: #5d7869;
  margin-right: 5px;
}
.ed-btn {
  border: 1px solid #cedbd1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  background: #fff;
  color: #355444;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.ed-btn:hover:not(:disabled) {
  background: #e6f0e8;
}
.ed-btn.ed-primary {
  background: #176447;
  color: white;
  border-color: #176447;
  padding-inline: 14px;
}
.ed-btn.ed-primary:hover {
  background: #124f39;
}
.ed-btn.ed-accent {
  background: #ecf5eb;
  color: #235a3f;
  border-color: #adcbb3;
}
.ed-main-actions .ed-btn {
  min-height: 33px;
}
.ed-symbol {
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 15px;
  line-height: 1;
}
.ed-monitor {
  border: 1px solid #19372f;
  border-radius: 10px;
  background: #132922;
  color: #edf5ed;
  overflow: hidden;
}
.ed-media-head,
.ed-thead,
.ed-foot,
.ed-controls {
  justify-content: space-between;
  gap: 10px;
}
.ed-media-head {
  padding: 8px 14px;
  background: #20392f;
  min-height: 35px;
}
.ed-monitor h2,
.ed-timeline h2 {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.ed-media-head small {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #c4daca;
}
.ed-media-head i {
  width: 6px;
  height: 6px;
  background: #9cceb0;
  border-radius: 100%;
}
.ed-stage {
  position: relative;
  width: 100%;
  height: clamp(230px, 40vh, 495px);
  background: #0b1915;
  overflow: hidden;
}
.ed-pair {
  width: 100%;
  height: 100%;
}
.ed-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ed-pair figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ed-pair figure + figure {
  border-left: 1px solid #83948755;
}
.ed-pair img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.ed-stage:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 1px solid #83948762;
  pointer-events: none;
}
.ed-eye {
  position: absolute;
  top: 9px;
  background: #142e24ce;
  color: #fff;
  border-radius: 3px;
  padding: 3px 7px;
  font-size: 10px;
  letter-spacing: 0.045em;
  font-weight: 630;
}
.ed-eye.left {
  left: 10px;
}
.ed-eye.right {
  left: calc(50% + 10px);
}
.ed-controls {
  padding: 5px 12px;
  min-height: 37px;
}
.ed-controls .ed-btn {
  background: transparent;
  color: #d7eade;
  border: 0;
  padding: 4px;
  min-width: 26px;
  min-height: 25px;
}
.ed-controls .ed-btn:hover:not(:disabled) {
  background: #3a5146;
}
.ed-controls .ed-play {
  background: #c4e5cb;
  color: #234c35;
}
.ed-time,
.ed-total {
  font-family: var(--ed-mono);
  font-variant-numeric: tabular-nums;
}
.ed-time {
  font-size: 13px;
  margin-left: 4px;
}
.ed-total {
  font-size: 11px;
  color: #b9cbbf;
}
.ed-rate {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #bbd3c4;
  font-size: 11px;
}
.ed-rate select {
  padding: 3px 4px;
  background: #243d34;
  color: #eef7f0;
  border: 1px solid #658373;
  font-weight: 650;
  font-size: 12px;
}
.ed-timeline {
  margin-top: 12px;
  background: white;
  border: 1px solid var(--ed-border);
  border-radius: 10px;
  overflow: hidden;
}
.ed-thead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ed-border);
  min-height: 42px;
}
.ed-thead h2 svg {
  color: #41815e;
}
.ed-thead small {
  font-size: 10px;
  color: #687a6b;
}
.ed-thead [data-window-span] {
  font-size: 12px;
  font-weight: 600;
  color: #274b38;
  border: 1px solid #b6c8bc;
  background: #f7faf7;
  border-radius: 5px;
  padding: 4px;
}
.ed-thead .ed-inline > .ed-btn:not(.ed-accent) {
  border: 0;
  background: transparent;
  min-height: 25px;
  min-width: 21px;
  padding: 0;
}
.ed-thead .ed-accent {
  margin-left: 5px;
}
.ed-divider {
  height: 15px;
  border-left: 1px solid var(--ed-border);
  margin: 0 2px;
}
.ed-lanes {
  --head: clamp(140px, 17vw, 249px);
  padding: 0 14px;
}
.ed-scale,
.ed-lane {
  display: grid;
  grid-template-columns: var(--head) minmax(0, 1fr);
}
.ed-scale {
  min-height: 25px;
  align-items: end;
  font: 10px/1.35 var(--ed-mono);
  color: #688071;
  padding: 5px 0;
}
.ed-scale > span {
  font:
    10px/1.35 "Segoe UI",
    "Microsoft YaHei UI",
    sans-serif;
}
.ed-scale > div {
  position: relative;
  min-height: 1.35em;
  container-type: inline-size;
  cursor: crosshair;
  touch-action: none;
}
.ed-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  pointer-events: none;
}
.ed-tick:first-child {
  transform: none;
}
.ed-tick:nth-child(6) {
  transform: translateX(-100%);
}
@container (max-width: 460px) {
  .ed-tick:nth-child(2),
  .ed-tick:nth-child(5) {
    display: none;
  }
}
@container (max-width: 260px) {
  .ed-tick:nth-child(3),
  .ed-tick:nth-child(4) {
    display: none;
  }
}
.ed-lane {
  border-top: 1px solid #e0e7e0;
  align-items: stretch;
  min-height: 50px;
}
.ed-track-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  gap: 5px;
  align-items: center;
  padding: 4px 5px 4px 0;
}
.ed-track-no {
  background: color-mix(in srgb, var(--lane) 8%, white);
  color: var(--lane);
  border: 1px solid color-mix(in srgb, var(--lane) 24%, white);
  border-radius: 4px;
  min-height: 25px;
  font: 600 11px var(--ed-mono);
}
.ed-lane.active .ed-track-no {
  background: var(--lane);
  color: white;
}
.ed-track-info {
  display: grid;
  justify-items: start;
  align-items: center;
  min-width: 0;
}
.ed-track-info button {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 2px 1px;
  font-size: 12px;
  font-weight: 630;
  color: #2d4738;
}
.ed-track-info button + button {
  font-size: 10px;
  color: #587767;
  font-weight: 500;
}
.ed-track-info button:disabled {
  opacity: 1;
}
.ed-track-info .ed-symbol {
  font-size: 10px;
  color: #748d78;
}
.ed-track-info button:hover:not(:disabled) {
  color: #147447;
  text-decoration: underline;
}
.ed-lane-menu {
  border: 0;
  background: transparent;
  color: #5d7161;
  border-radius: 3px;
  min-height: 22px;
}
.ed-lane-menu:hover {
  background: #e7efe8;
}
.ed-rail-area {
  display: flex;
  align-items: center;
  min-width: 0;
}
.ed-rail {
  position: relative;
  width: 100%;
  height: 32px;
  touch-action: none;
  cursor: crosshair;
  box-shadow: inset 0 0 0 1px #d9e3d9;
  background-color: #f3f6f1;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(20% - 1px),
    #d6e0d5 20%
  );
  border-radius: 4px;
}
.ed-lane.active .ed-rail {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lane) 45%, white);
}
.ed-segment,
.ed-ghost {
  position: absolute;
  top: 3px;
  bottom: 3px;
  max-width: 100%;
  border-radius: 3px;
}
.ed-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 10px/1 var(--ed-mono);
  container-type: inline-size;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--lane) 63%, white);
  background: color-mix(in srgb, var(--lane) 20%, white);
  color: #213b2e;
  padding: 0;
  min-width: 2px;
  cursor: grab;
}
.ed-segment.picked {
  background: color-mix(in srgb, var(--lane) 66%, white);
  color: #11281d;
  outline: 2px solid var(--lane);
  outline-offset: 1px;
  z-index: 2;
}
.ed-segment span {
  pointer-events: none;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 5px;
}
.ed-segment span b {
  font-size: 9px;
  font-weight: 500;
}
.ed-segment [data-edge] {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
  z-index: 1;
}
.ed-segment [data-edge]:after {
  content: "";
  height: 45%;
  border-left: 1px solid var(--lane);
  position: absolute;
  top: 27%;
  left: 2px;
}
.ed-segment [data-edge="start"] {
  left: 0;
}
.ed-segment [data-edge="end"] {
  right: 0;
}
.ed-short-pin {
  display: none;
}
@container (max-width: 22px) {
  .ed-segment [data-edge],
  .ed-segment span {
    display: none;
  }
  .ed-short-pin {
    display: block;
    position: absolute;
    left: 50%;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--lane);
    border: 1px solid white;
    border-radius: 2px;
    transform: translateX(-50%) rotate(45deg);
    pointer-events: none;
  }
}
.ed-headline,
.ed-boundary,
.ed-start-marker {
  pointer-events: none;
  position: absolute;
  top: -4px;
  bottom: -4px;
}
.ed-headline {
  z-index: 5;
  border-left: 1.5px solid #bf602e;
}
.ed-headline:before {
  content: "";
  position: absolute;
  top: -2px;
  left: -3px;
  width: 5px;
  height: 6px;
  background: #bf602e;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 50% 100%, 0 50%);
}
.ed-boundary {
  z-index: 3;
  border-left: 1.5px dashed #537c91;
}
.ed-start-marker {
  z-index: 6;
  border-left: 3px solid #5936a0;
  transform: translateX(-1.5px);
}
.ed-start-marker b {
  position: absolute;
  top: 3px;
  left: 0;
  border-radius: 0 3px 3px 0;
  padding: 2px 4px;
  color: white;
  background: #5936a0;
  font: 600 10px/1.3 "Microsoft YaHei UI", sans-serif;
  white-space: nowrap;
}
.ed-start-marker.flag-left b {
  left: auto;
  right: 0;
  border-radius: 3px 0 0 3px;
}
.ed-ghost {
  pointer-events: none;
  z-index: 4;
  border: 2px dashed var(--lane);
  background: color-mix(in srgb, var(--lane) 25%, transparent);
}
.ed-ghost.invalid {
  border-color: #b54d38;
  background: #d84d3330;
}
.ed-foot {
  padding: 7px 12px;
  border-top: 1px solid var(--ed-border);
  min-height: 38px;
  flex-wrap: wrap;
}
.ed-foot .ed-btn {
  font-size: 11px;
  min-height: 26px;
  padding: 4px 7px;
}
.ed-foot .ed-inline {
  flex-wrap: wrap;
}
.ed-clip-picker {
  max-width: 100%;
  min-height: 28px;
  padding: 3px 5px;
  border: 1px solid #b6c8bc;
  border-radius: 5px;
  background: #f8faf8;
  color: #274b38;
  font: 600 11px var(--ed-mono);
}
.ed-delete:not(:disabled) {
  color: #9a4235;
}
.ed-nearby {
  display: grid;
  gap: 6px;
  max-height: 50vh;
  overflow: auto;
}
.ed-nearby button {
  text-align: left;
  border: 1px solid #cddbd1;
  color: #274b38;
  background: #f7faf7;
  border-radius: 5px;
  padding: 9px 12px;
  font: 600 13px Consolas, "Microsoft YaHei UI", sans-serif;
}
.ed-nearby button:hover,
.ed-nearby button:focus-visible {
  background: #e1eee4;
}
.ed-foot > span {
  font-size: 10px;
  color: #66786a;
}
.ed-foot .ed-warn,
.ed-warn {
  color: #98462f;
}
.ed-tip {
  position: fixed;
  background: #183e30;
  color: #e9f5e8;
  border: 1px solid #436956;
  border-radius: 6px;
  z-index: 81;
  box-shadow: 0 4px 14px #102e2733;
  padding: 8px 10px;
  max-width: min(310px, 95vw);
  pointer-events: none;
  font-size: 11px;
  line-height: 1.5;
}
.ed-tip > * {
  display: block;
}
.ed-tip span {
  font-family: var(--ed-mono);
}
.ed-tip small {
  color: #c1d8c7;
}
.ed-pan {
  margin: 2px 14px 8px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: #516c5b;
}
.ed-pan input {
  min-width: 50px;
  flex: 1 1 75px;
  accent-color: #297353;
  cursor: pointer;
}
.ed-pan .ed-btn {
  min-width: 25px;
  min-height: 24px;
  padding: 0 6px;
  font-size: 16px;
}
.ed-pan output {
  font: 11px var(--ed-mono);
  white-space: nowrap;
}
.ed-empty {
  padding: 23px 8px;
  display: grid;
  gap: 6px;
  justify-items: center;
  color: #506f5e;
}
.ed-empty small {
  font-size: 11px;
}
.ed-banner {
  padding: 7px 10px;
  background: #eaf0f3;
  border: 1px solid #cbdae0;
  color: #476775;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.ed-ml {
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid #e4ebe4;
  padding: 7px 0;
  color: #5b7161;
  overflow-wrap: anywhere;
}
.ed-ml b {
  color: #263f30;
  text-align: right;
}
.ed-range-form {
  gap: 10px;
  margin: 12px 0;
}
.ed-range-form label,
.ed-note-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  min-width: 0;
  flex: 1;
}
.ed-range-form input {
  width: 100%;
  font-family: var(--ed-mono);
}
.ed-note-field textarea {
  min-height: 55px;
}
.ed-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  width: 100%;
  background: #f1f6f0;
  border: 1px solid #d7e3d7;
  border-radius: 7px;
  margin-top: 8px;
  padding: 8px 11px;
  font-size: 12px;
}
.ed-result-row b {
  margin: 0 6px;
}
.ed-result-row small {
  display: block;
  margin-left: 26px;
  color: #63796b;
}
.ed-result-row em {
  font-style: normal;
  color: #296a48;
}
.proto-modal:has(.ed-json) {
  width: min(750px, 94vw);
}
.ed-json {
  font-family: var(--ed-mono);
}
@media (min-width: 1650px) {
  .ed-stage {
    height: clamp(355px, 44vh, 535px);
  }
}
@media (max-width: 850px) {
  .editor-workspace {
    padding-inline: 12px;
  }
  .ed-lanes {
    --head: 152px;
    padding-inline: 9px;
  }
  .ed-track-head {
    grid-template-columns: 22px minmax(0, 1fr) 16px;
    gap: 2px;
  }
  .ed-stage {
    height: clamp(172px, 35vh, 360px);
  }
  .ed-top {
    margin-bottom: 9px;
  }
  .ed-thead small {
    display: none;
  }
  .ed-segment span b {
    display: none;
  }
}
@media (max-width: 600px) {
  .editor-workspace {
    padding: 10px 6px 20px;
  }
  .ed-top {
    align-items: flex-end;
    gap: 5px;
  }
  .ed-main-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    max-width: 45%;
  }
  .ed-main-actions > small {
    width: 100%;
    text-align: right;
  }
  .ed-main-actions .ed-btn {
    padding: 4px 6px;
    min-height: 25px;
    font-size: 10px;
  }
  .ed-stage {
    height: max(115px, 31vw);
  }
  .ed-controls,
  .ed-media-head {
    padding-inline: 7px;
  }
  .ed-controls .ed-inline {
    gap: 2px;
  }
  .ed-total,
  .ed-media-head small,
  .ed-source small {
    font-size: 9px;
  }
  .ed-thead {
    padding: 6px;
    gap: 3px;
  }
  .ed-thead .ed-inline {
    gap: 2px;
  }
  .ed-lanes {
    --head: 110px;
    padding-inline: 5px;
  }
  .ed-track-head {
    grid-template-columns: 19px minmax(0, 1fr) 13px;
  }
  .ed-track-info button {
    font-size: 10px;
  }
  .ed-foot {
    padding: 5px;
    gap: 5px;
  }
  .ed-lane {
    min-height: 42px;
  }
  .ed-timeline h2 {
    font-size: 12px;
  }
  .ed-thead .ed-accent {
    font-size: 10px;
    padding: 3px 5px;
    min-height: 25px;
  }
  .ed-lane-menu {
    padding: 0;
  }
  .ed-time {
    font-size: 11px;
  }
  .ed-foot .ed-inline {
    flex-wrap: wrap;
  }
  .ed-scale {
    font-size: 8px;
  }
  .ed-scale > span {
    font-size: 9px;
  }
  .ed-foot .ed-btn {
    padding: 3px 5px;
  }
  .ed-source {
    display: block;
    font-size: 10px;
  }
}
[data-media-surface].ed-pair {
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-media-surface] img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.media-state {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: #10251ee8;
  color: #e0eee2;
}
.media-state[hidden] {
  display: none;
}
.ed-monitor:fullscreen {
  display: flex;
  flex-direction: column;
  border-radius: 0;
}
.ed-monitor:fullscreen .ed-stage {
  flex: 1;
  height: auto;
  min-height: 0;
}
.ed-monitor:fullscreen .ed-controls {
  min-height: 48px;
}
.ed-json {
  max-height: 55vh;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
