/* Cognition topic bar — Workshop / Bedroom */
.topic-bar {
  display: flex;
  grid-column: 1 / -1;
  box-sizing: border-box;
  min-height: 44px;
  height: auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(41, 196, 192, 0.25);
  background: rgba(4, 14, 18, 0.85);
  position: relative;
  z-index: 5;
  overflow: visible;
}
.topic-bar[hidden] { display: none !important; }

.topic-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #29c4c0;
  font-weight: 800;
}

.topic-input {
  flex: 1 1 140px;
  min-width: 120px;
  background: rgba(3, 10, 7, 0.9);
  border: 1px solid rgba(41, 196, 192, 0.35);
  color: #e8d9ba;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
}
.topic-input.topic-search { flex: 0 1 120px; }

.topic-btn {
  appearance: none;
  border: 1px solid rgba(41, 196, 192, 0.45);
  background: rgba(3, 12, 14, 0.9);
  color: #29c4c0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.topic-btn:hover { border-color: #29c4c0; color: #fff; }
.topic-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.topic-btn.is-end {
  border-color: rgba(200, 150, 42, 0.5);
  color: #e8bd4f;
}

.topic-status {
  font-size: 0.62rem;
  color: #6b8574;
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-results {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 4px);
  max-height: 220px;
  overflow: auto;
  background: #0a1410;
  border: 1px solid rgba(41, 196, 192, 0.35);
  z-index: 40;
  padding: 4px;
}
.topic-result {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #e8d9ba;
  padding: 8px;
  cursor: pointer;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(200, 150, 42, 0.12);
}
.topic-result:hover { background: rgba(41, 196, 192, 0.12); }
.topic-result code { color: #e8bd4f; font-size: 0.68rem; }
.topic-path { color: #6b8574; font-size: 0.6rem; word-break: break-all; }
.topic-result-empty { padding: 10px; color: #6b8574; font-size: 0.72rem; }
