.live-route-picker {
  width: min(460px, calc(100vw - 32px));
  max-height: min(90vh, 700px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 18px 60px #17202d30;
}

.live-route-picker::backdrop {
  background: #17202d70;
}

.live-route-picker form {
  position: relative;
  display: grid;
  gap: 14px;
}

.live-route-picker [hidden] {
  display: none !important;
}

.live-route-picker h2 {
  margin: 0;
  font: 700 20px Manrope, sans-serif;
}

.live-route-picker form > p {
  margin: -7px 0 2px;
  color: var(--sub);
  line-height: 1.5;
}

.live-route-picker form > section {
  display: grid;
  gap: 12px;
}

.live-route-picker form > section[hidden] {
  display: none;
}

.live-route-step-label {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.live-route-help {
  margin: -5px 0 0;
  color: var(--sub);
  font-size: 11px;
  line-height: 1.45;
}

.live-route-picker label {
  display: grid;
  gap: 5px;
  color: var(--sub);
  font-size: 11px;
}

.live-route-picker select {
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
}

.live-route-picker-preview {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--sub);
  background: #fafbfd;
  font-size: 11px;
  line-height: 1.45;
}

.live-route-picker-preview strong {
  color: var(--ink);
}

.live-route-picker-preview ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.live-route-picker-preview li {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(0, 1fr);
  gap: 8px;
  overflow-wrap: anywhere;
}

.live-route-picker-preview li span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.department-hours-dialog {
  width: min(680px, calc(100vw - 32px));
}

.department-hours-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 48vh;
  overflow: auto;
}

.department-hours-day {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.department-hours-day legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.department-hours-periods {
  display: grid;
  gap: 7px;
}

.department-hours-period {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 6px;
}

.department-hours-period input {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
}

.department-hours-period label {
  font-size: 10px;
}

.department-hours-period .text-action {
  padding: 0 2px 8px;
  font-size: 10px;
}

.department-hours-closed {
  color: var(--sub);
  font-size: 11px;
}

.department-hours-day > .text-action {
  margin-top: 8px;
  font-size: 10px;
}

.live-group-hours {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #edf0f3;
}

.live-group-hours > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.live-group-hours strong {
  color: var(--ink);
  font-size: 11px;
}

.live-group-hours span {
  color: var(--sub);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.live-mode .node-library {
  border-top: 2px solid #dce5f2;
}

.live-mode .node-library .library-node {
  cursor: grab;
  touch-action: none;
}

.live-mode .node-library .library-node:active {
  cursor: grabbing;
}

.live-mode #flow-stage.drop-ready {
  background-color: #f3f7fd;
}

.live-mode .flow-node[data-drop-target="inbound-did"] {
  cursor: copy;
  transition: box-shadow .15s, border-color .15s, background-color .15s;
}

.live-mode .flow-node[data-drop-target="inbound-did"].drop-target {
  border-color: var(--blue);
  background: #f4f8ff;
  box-shadow: 0 0 0 3px #385fba36, 0 6px 18px #20324b18;
}

@media (max-width: 560px) {
  .live-route-picker {
    padding: 18px;
  }

  .department-hours-days {
    grid-template-columns: 1fr;
  }

  .live-group-hours {
    align-items: flex-start;
    flex-direction: column;
  }
}
