/* ===============================
   레이아웃
================================ */
.nk-container {
  max-width: 1200px; /* 메인과 통일 */
  margin: 0 auto;
  padding: 32px 16px 48px;
}

/* 타이틀/설명 */
.nk-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}
.nk-desc {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* 입력 영역 */
.nk-input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nk-label {
  font-size: 14px;
  font-weight: 600;
}
.nk-label-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-left: 4px;
}
#keywords {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.18);
}

/* ===============================
   버튼들 – 메인 느낌의 연한 회색
================================ */
.nk-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.nk-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  background: #f5f5f7;
  color: #1b1b1b;
  transition: background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.nk-btn:hover {
  background: #e4e4ea;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 타입별 클래스는 일단 같은 스타일 유지 */
.nk-btn-primary,
.nk-btn-secondary,
.nk-btn-green {
  background: #f5f5f7;
  color: #1b1b1b;
}
.nk-btn-primary:hover,
.nk-btn-secondary:hover,
.nk-btn-green:hover {
  background: #e4e4ea;
}

.nk-status {
  text-align: left;
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 16px;
}

/* ===============================
   테이블 – 모바일에서 가로 스크롤
================================ */
.nk-table-wrapper {
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  margin-bottom: 24px;
}
.nk-table-wrapper::-webkit-scrollbar {
  display: none;
}

.nk-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

.nk-table th,
.nk-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
  white-space: nowrap;
}

.nk-table th {
  background: rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

/* 연관검색어 버튼 */
.nk-related-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: #ffffff;
  font-size: 12px;
  cursor: pointer;
}

/* ===============================
   섹션 카드
================================ */
.nk-cards-wrapper {
  margin-top: 28px;
}
.nk-card-title-main {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}
.nk-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.nk-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  background: #ffffff;
}
.nk-card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.nk-card-sub {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.7;
  margin: 6px 0 2px;
}

/* ===============================
   연관검색어 모달
================================ */
.rk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s;
  z-index: 500;
}
.rk-overlay.open {
  opacity: 1;
  visibility: visible;
}

.rk-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: min(480px, calc(100% - 32px));
  max-height: 70vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  z-index: 510;
  transition: 0.18s;
}
.rk-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.rk-modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rk-modal-header h3 {
  margin: 0;
  font-size: 15px;
}

.rk-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

.rk-modal-body {
  padding: 14px 18px 10px;
  overflow-y: auto;
}

#rk-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

/* 모달 푸터 (복사 버튼) */
.rk-modal-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  justify-content: flex-end;
}
.rk-copy-btn {
  font-size: 13px;
}

/* 모바일에서 살짝 축소 */
@media (max-width: 768px) {
  .nk-container {
    padding-top: 24px;
  }
  .nk-title {
    font-size: 22px;
  }
}

/* 토스트 */
#nk-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 99999;
}
#nk-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
