.semantic-help {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin: -10px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(54, 215, 232, 0.18);
  border-radius: 11px;
  background: rgba(54, 215, 232, 0.035);
}

.semantic-help b {
  color: #8cecf5;
  font-size: 10px;
  white-space: nowrap;
}

.semantic-help span {
  color: #7892a4;
  font-size: 10px;
  line-height: 1.6;
}

.semantic-picker-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(82, 224, 173, 0.055);
  border: 1px solid rgba(82, 224, 173, 0.16);
}

.semantic-picker-help b {
  color: #8cefc8;
  font-size: 10px;
  white-space: nowrap;
}

.semantic-picker-help span {
  color: #7897a8;
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

.assignment {
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.assignment:hover {
  border-color: color-mix(in srgb, var(--role-colour) 46%, transparent);
  background: rgba(9, 24, 36, 0.72);
}

.assignment:focus-visible {
  outline: 2px solid var(--role-colour);
  outline-offset: 2px;
}

.assignment.selected {
  border-color: var(--role-colour);
  background: linear-gradient(120deg, color-mix(in srgb, var(--role-colour) 14%, transparent), rgba(4, 13, 22, 0.62));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--role-colour) 26%, transparent), 0 10px 28px rgba(0, 0, 0, 0.22);
  transform: translateX(3px);
}

.assignment-title {
  min-width: 0;
}

.assignment-select {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.assignment-select:hover:not(:disabled) {
  transform: none;
  filter: none;
}

.assignment-select:focus-visible {
  outline: 2px solid var(--role-colour);
  outline-offset: 4px;
}

.assignment-select > span {
  justify-self: end;
  text-align: right;
}

.assignment-title b {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d8ecf4;
}

.assignment-title b::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--role-colour);
  box-shadow: 0 0 12px color-mix(in srgb, var(--role-colour) 58%, transparent);
}

.assignment-ids {
  grid-column: 1 / 2;
  grid-row: 2;
  min-width: 0;
}

.assignment-ids summary {
  width: max-content;
  color: #5f7b8d;
  font-size: 8px;
  cursor: pointer;
  user-select: none;
}

.assignment-ids[open] summary {
  color: #84a8ba;
  margin-bottom: 8px;
}

.assignment-ids code {
  display: block;
  margin-bottom: 6px;
  color: #5d788c;
  font: 8px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignment-ids input {
  display: block;
  width: 100%;
  font-size: 9px;
  padding: 8px;
}

.assignment .assignment-id-save {
  display: block;
  width: 100%;
  margin-top: 7px;
  grid-column: auto;
  grid-row: auto;
}

.assignment .assignment-confirm {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: #bff8ff;
  background: color-mix(in srgb, var(--role-colour) 18%, rgba(6, 25, 36, 0.9));
  border: 1px solid color-mix(in srgb, var(--role-colour) 34%, transparent);
}

.assignment input::placeholder {
  color: #405d71;
}

#semantic-preview .semantic-overlay-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 570px;
  position: relative;
  z-index: 1;
}

#semantic-preview svg [data-role] {
  transition: opacity 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

#semantic-preview svg [data-role].semantic-muted {
  opacity: 0.13 !important;
}

#semantic-preview svg [data-zone="legend"] [data-role].semantic-muted {
  opacity: 0.24 !important;
}

#semantic-preview svg [data-zone="drawing"] [data-role].semantic-highlight {
  opacity: 1 !important;
  stroke-width: 9px !important;
  filter: drop-shadow(0 0 7px currentColor);
}

#semantic-preview svg [data-zone="legend"] [data-role].semantic-highlight {
  opacity: 1 !important;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.18));
}

#semantic-preview svg [data-zone="legend"] [data-role].semantic-highlight text {
  fill: #ffffff;
  font-weight: 800;
}

@media (max-width: 620px) {
  .semantic-help {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .semantic-picker-help {
    align-items: flex-start;
    flex-direction: column;
  }

  .semantic-picker-help span {
    text-align: left;
  }

  .assignment {
    grid-template-columns: 1fr;
  }

  .assignment-select {
    grid-template-columns: 1fr;
  }

  .assignment-select > span {
    justify-self: start;
    text-align: left;
  }

  .assignment-ids,
  .assignment .assignment-confirm {
    grid-column: 1;
    grid-row: auto;
  }
}
