/* Targets screen: compact, mobile-safe, monochrome source language. */
html,
body,
.app-shell,
.main-content,
.screen,
.target-list,
.target-row,
.target-open,
.target-copy,
.source-editor,
.source-editor-row {
  min-width: 0;
  max-width: 100%;
}

html,
body {
  overflow-x: hidden;
}

#screen-targets {
  width: 100%;
  overflow-x: clip;
}

#screen-targets .section-head {
  align-items: center;
}

#screen-targets .section-head h1 {
  font-size: clamp(36px, 11vw, 46px);
}

.target-list {
  width: 100%;
}

.target-row {
  width: 100%;
  overflow: hidden;
  gap: 6px;
  padding: 7px;
}

.target-open {
  flex: 1 1 0;
  width: 0;
  overflow: hidden;
  gap: 11px;
}

.target-copy {
  overflow: hidden;
}

.target-copy strong,
.target-copy small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.target-copy small {
  margin-top: 3px;
}

.target-source-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
  margin-top: 6px;
  color: var(--muted);
}

.source-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.source-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.source-icon svg .fill {
  fill: currentColor;
  stroke: none;
}

.source-mark {
  width: 30px;
  min-width: 30px;
  height: 28px;
  padding: 5px;
  color: var(--muted) !important;
  border-color: var(--line);
  background: var(--surface-2);
}

.source-mark .source-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

/* Source editor: never require a third horizontal column on phone. */
.source-editor-row {
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  overflow: hidden;
}

.source-editor-copy {
  min-width: 0;
}

.source-editor-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
}

.source-editor-copy strong .source-icon {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
  color: var(--muted);
}

.source-editor-row .source-value {
  grid-column: 1 / -1;
  min-width: 0;
  width: 100%;
}

.source-editor-copy small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal-card,
.target-detail-card,
.source-discovery {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 520px) {
  .source-editor-copy .source-name {
    font-size: 11px;
    font-weight: 800;
  }
}

@media (max-width: 420px) {
  .main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .target-row .avatar {
    width: 42px;
    height: 42px;
  }

  .target-row .favorite-button {
    width: 36px;
    height: 36px;
  }

  .target-count {
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
  }
}
