/* QIYUAN V8.3.3 — simple 4-column source selector */

.dream-source-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: start;
  gap: 8px;
  margin: 0 0 14px;
}

.dream-source-compact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.dream-source-compact-grid > button {
  min-width: 0;
  height: 34px;
  padding: 0 7px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  color: #aeb3c7;
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
  font-size: 10px;
  line-height: 1;
  font-weight: 760;
  white-space: nowrap;
  transition:
    transform .16s ease,
    border-color .16s ease,
    color .16s ease,
    background .16s ease;
}

.dream-source-compact-grid > button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.16);
}

.dream-source-compact-grid > button.is-active {
  color: #fff;
  border-color: var(--dream-channel-accent);
  background:
    linear-gradient(
      120deg,
      rgba(82,64,254,.18),
      rgba(255,255,255,.055)
    );
  box-shadow:
    0 7px 18px rgba(82,64,254,.12),
    inset 0 1px 0 rgba(255,255,255,.07);
}

.dream-source-compact-grid .dream-channel-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--dream-channel-accent);
  box-shadow: 0 0 8px var(--dream-channel-accent);
}

.dream-source-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dream-source-more-button {
  width: 76px;
  height: 34px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid rgba(255,229,136,.28);
  border-radius: 13px;
  color: #f4db80;
  background:
    linear-gradient(
      135deg,
      rgba(255,229,136,.08),
      rgba(255,200,112,.035)
    );
  font-size: 10px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.dream-source-more-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255,229,136,.5);
}

.dream-source-more-button[aria-expanded="true"] {
  color: #18151c;
  border-color: transparent;
  background:
    linear-gradient(
      110deg,
      var(--v8-c, #FFC870),
      #FFE588
    );
}

/* Hide previous experimental source rows if their CSS/DOM remains elsewhere. */
.dream-search-card .dream-channel-tabs {
  display: none !important;
}

@media (max-width: 420px) {
  .dream-source-compact {
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: 5px;
  }

  .dream-source-compact-grid {
    gap: 4px;
  }

  .dream-source-compact-grid > button {
    height: 32px;
    padding: 0 4px;
    gap: 3px;
    border-radius: 11px;
    font-size: 9px;
  }

  .dream-source-more-button {
    width: 66px;
    height: 32px;
    padding: 0 4px;
    border-radius: 11px;
    font-size: 9px;
  }

  .dream-source-compact-grid .dream-channel-dot {
    width: 5px;
    height: 5px;
    flex-basis: 5px;
  }
}
