 .koujob-related-jobs {
  margin: 32px 0;
  padding: 20px;
  border-radius: 8px;
  background: #f5f7fb;
  border: 1px solid #e0e4f0;
  font-size: 14px;
}

/* 見出し（テーマの h2 スタイルに影響されないように上書き） */
.koujob-related-jobs h2.koujob-related-title {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  font-size: 18px !important;
  font-weight: 600;
  line-height: 1.4;
  color: #222;
}

.koujob-related-header {
  margin-bottom: 8px;
}

/* 検索フォームブロック（前回プラグイン風のコンパクトUIを意識） */
.koujob-related-search {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #dde2ee;
}

.koujob-related-search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.koujob-field {
  display: flex;
  flex-direction: column;
}

.koujob-field-label {
  font-size: 11px;
  color: #666;
  margin-bottom: 2px;
}

.koujob-related-search select {
  min-width: 160px;
  max-width: 220px;
  padding: 5px 8px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #c7cfdd;
  background-color: #fff;
}

.koujob-related-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.koujob-related-search-button {
  padding: 7px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  background: #0052cc;
  color: #fff;
  font-weight: 600;
}

.koujob-related-search-button:hover {
  opacity: 0.9;
}

/* カード周り */
.koujob-related-cards-wrapper {
  position: relative;
  min-height: 40px;
}

.koujob-related-cards-wrapper.is-loading::after {
  content: '読み込み中...';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.7);
  font-size: 13px;
  color: #555;
  z-index: 5;
}

.koujob-related-cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.koujob-related-card {
  flex: 0 0 260px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #dde2ee;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.koujob-related-card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.koujob-related-card-image img {
  display: block;
  width: 100%;
  height: auto;
}

.koujob-related-card-body {
  padding: 10px 10px 4px;
}

.koujob-related-card-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  line-height: 1.4;
  min-height: 2.8em; /* 2行ぶん確保して高さブレ軽減 */
}

.koujob-label {
  font-weight: 600;
  margin-right: 2px;
}

.koujob-label-value {
  font-weight: 400;
}

.koujob-related-card-salary,
.koujob-related-card-location {
  margin: 0 0 2px;
  font-size: 12px;
}

.koujob-related-card-salary .koujob-label-value {
  color: #d13b3b;
  font-size: 13px;
}

.koujob-related-card-desc {
  margin: 4px 0 2px;
  font-size: 12px;
  color: #444;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* 最大3行に抑えて高さを揃える */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.koujob-related-card-badges {
  margin-top: 4px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.koujob-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.2;
}

.koujob-badge-dorm {
  background: #e3f4ff;
  color: #0061a8;
}

.koujob-badge-dorm-special {
  background: #fff3d6;
  color: #8a5b00;
}

.koujob-related-card-footer {
  margin-top: auto;
  padding: 8px 10px 10px;
}

.koujob-related-card-button {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 4px;
  background: #0052cc;
  color: #fff;
  font-size: 12px;
}

.koujob-related-empty,
.koujob-related-error {
  font-size: 13px;
  color: #666;
  margin: 8px 0 0;
}

/* SP 調整 */
@media (max-width: 767px) {
  .koujob-related-jobs {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0;
  }
  .koujob-related-search-fields {
    flex-direction: column;
  }
  .koujob-related-search select {
    min-width: 100%;
    max-width: 100%;
  }
  .koujob-related-search-actions {
    justify-content: flex-end;
  }
  .koujob-related-card {
    flex: 0 0 80%;
    min-width: 220px;
  }
}
